Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reed Solomon for large file saving #77

Open
eragondr opened this issue Apr 2, 2024 · 1 comment
Open

Reed Solomon for large file saving #77

eragondr opened this issue Apr 2, 2024 · 1 comment

Comments

@eragondr
Copy link

eragondr commented Apr 2, 2024

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.
image

However this does not work with large file. in my example i use a video have 1.91mb
image

Looking forward for your rely . Thank you

@vzool
Copy link

vzool commented Jul 27, 2024

I think you need to tweak ecc_symbols value, it has an acceptable range between 0-245 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants