0
我在一個Java項目中使用Reed-Solomon錯誤更正。我使用的庫是JavaReedSolomon(https://github.com/Backblaze/JavaReedSolomon)。存在使用JavaReedSolomon解碼的一個示例:使用Reed Solomon解碼,我們是否需要知道哪些分片是正確的?
byte[][] shards = new byte[NUM_SHARDS][SHARD_SIZE];
//shards is the array containing all the shards
ReedSolomon reedSolomon = ReedSolomon.create(NUM_DATA_SHARDS, NUM_PARITY_SHARDS);
reedSolomon.decodeMissing(shards, shardPresent, 0, shardSize);
陣列shardPresent表示碎片肯定是正確的,例如,如果是肯定的第四碎片是正確的,那麼shardPresent [3]等於true。
我的問題是,Reed-Solomon解碼必然需要知道哪些分片是正確的,或者這個庫如何實現它?