-
Notifications
You must be signed in to change notification settings - Fork 86
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
Predicting RS encoded bytes size #75
Comments
Thank you for your feedback and your question. This is almost certainly due to the automatic chunking that is done in the Instead of trying to predict when the chunking will happen, I would rather suggest that you forego using the Anyway, if you can provide me with a self-contained minimalistic reproducible example code, then I can investigate this issue further and try to improve the reproducibility of RSCodec chunking in the future. |
Hi! Thank you very much for your answer! About the "low-level interface" I would like to use it but I'm not enough expert to understand how it work since I don't know how the reed-solomon error correction codes works. Can you hep me with a brief example for my case? |
I need for the sake of the function of my software to predict the size of the encoded block of data generated by RSCodec.encode().
This is an extract of my code:
As you can see I've a if statement that add some padding to the header_with_size bytearray if its size is littler than max_data_size.
If this if is triggered it makes header_with_size 1024 bytes long. After the rs.encode function, the encoded_data becomes 1074 bytes long.
If I comment out the padding if statement, I had cases where header_with_size's was of 300 bytes and the encoded_data's size was 310 which should be correct because I've initialized the RSCodec in this way "rs = RSCodec(ecc_bytes)" where ecc_bytes is 10.
So I thought that the encoded_data size is always 10 byte longer than the original size but it doesn't seem to be like this since when the bytearray is 1024 bytes long the encoding function adds 50 bytes, and I would like to understand if it's possible to predict this behaviour.
Thank you in advance
The text was updated successfully, but these errors were encountered: