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))
|