Reed Solomon for large file saving
eragondr opened this issue · 1 comments
First of all ! Thank you for your works. Love it .
So here is my problem. I have a file about 4gb. I want to break it into "N" pieces and store across many servers ,if some of these server go down , i can still retrieve all the files and recover origin file. In others words if some "x" chunk file is lost i can use the rest "N-x" chunk files to recover origin file .
How can I achieve this using Reed Solomon .
I tried for small byte array it works .
rsc = RSCodec(10) data =bytearray(range(0,4)) encode= rsc.encode(data)
bytearray(b'\x00\x01\x02\x03\x15\xf5\xe3\x86\xfa\x16/\xae\xc8 ')
so my strategy is encode the bytesarray then split it in to part :
the 1st part is the data which is \x00\x01\x02\x03 this I will break in to many pieces
dataE = encode[0:len(data)]
the 2nd part is parity x15\xf5\xe3\x86\xfa\x16/\xae\xc8 this will be saved some where safe
parity = encode[len(data):]
and the dataE and data are the same.
However this does not work with large file. in my example i use a video have 1.91mb
Looking forward for your rely . Thank you
I think you need to tweak ecc_symbols
value, it has an acceptable range between 0-245 🤔