Length of (message + ecc) be 255 vs 256?
crwang94 opened this issue · 1 comments
Hello there!
First, thank you for implementing the codec! It helps me a lot in my research.
I am just wondering that by the definition of RS codes, the length of message+ecc shall be no more than the number of symbols (2^c_exp). The reason is, each symbol in the message and ecc is an evaluation of a polynomial at a distinct element in GF(2^c_exp).
However, this library allows only 2^c_exp-1. Is there a specific reason for this?
Thank you!
Mmm thank you for raising this question. It's been a long time since I implemented these core details, but IIRC it was because Python is 0-indexed and if I tried to use 2^c_exp it made the algorithms choke. I'll have another look, indeed in the sibling library unireedsolomon that I also co-developed with an object oriented architecture (whereas here it's mostly functional) to ensure the implementation was truly universal, there is only one LOC of an if condition that prevents the use of 256, so it seems like it's something we could skip completely.