使用ReedSolomon库擦除文件代码

时间:2018-09-27 22:53:34

标签: javascript node.js reed-solomon erasure-code

使用[ReedSolomon JavaScript库] [1]擦除本地文件的代码,它给我以下错误:

shardSize 5432
bufferoffset 0
bufferSize 5432
paritysize 10864
sources 3
targets 12
/Users/nidhisharma/client-sdk/Node/0chain_sdk/encode.js:56
 var rs = ReedSolomon.encode(
                      ^

Error: shardSize % 8 != 0
    at fileinfo (/Users/XYZ/CS/encode.js:56:23)
    at Object.<anonymous> (/Users/XYZ/CS//client.js:6:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:279:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:752:3)    

但是碎片大小为5432。我不确定这里缺少什么并引起麻烦,请进行指导。

0 个答案:

没有答案