mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-04 09:04:47 +00:00
11 lines
252 B
Nim
11 lines
252 B
Nim
import ./merkledag
|
|
|
|
export merkledag
|
|
|
|
proc createChunks*(file: File): MerkleDag =
|
|
let contents = file.readAll()
|
|
MerkleDag(data: cast[seq[byte]](contents))
|
|
|
|
proc assembleChunks*(dag: MerkleDag, output: File) =
|
|
output.write(cast[string](dag.data))
|