Open meerd opened 5 years ago
Hi @meerd
In general, Reed-Solomon doesn't make any guarantees about what happens once you exceed the error-correction capabilities. There simply isn't enough information present to know whether this has happened. If you want to check the integrity of your data, add a checksum/CRC. You can verify your checksum after error correction, so that the checksum will only fail when the error rate exceeds the correction capacity.
Hello @brian-armstrong and others,
I am still evaluating libcorrect for one of my projects. In the application, an eight-byte payload exists, and it consists of 4 bytes data + 4 bytes RS error correction code. Please see my test code below. There are three functions:
1st - A basic encoding/decoding code that works as expected. 2nd - This function works on five different payloads. Some bits of the payloads corrupted, but all of them are expected to recover. The library successfully decodes these payloads as expected. 3rd - This function encodes five different data (all is 4 bytes long) and obtains payloads. (4 bytes + 4 bytes = 8 bytes) Then, in the code, I intentionally distort ECC part of the payload. The expected behavior would be seeing all with decoding errors, but interestingly the library successfully decodes 3 of 5 payloads.
Is it a bug? Or am I doing something wrong?
Looking forward to seeing your feedback.
Thanks in advance. meerd