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

Length of (message + ecc) be 255 vs 256? #73

Open
crwang94 opened this issue Oct 23, 2023 · 1 comment
Open

Length of (message + ecc) be 255 vs 256? #73

crwang94 opened this issue Oct 23, 2023 · 1 comment
Assignees
Labels

Comments

@crwang94
Copy link

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!

@lrq3000
Copy link
Collaborator

lrq3000 commented Oct 24, 2023

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.

@lrq3000 lrq3000 self-assigned this Oct 24, 2023
@lrq3000 lrq3000 added the bug label Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants