Comments (5)
problem occurs also in @lrq3000's fork (rev 7583ed)
from reedsolomon.
@SupraSummus Thank you for the detailed feedback, yes the codec is optimized for speed so it might not have all the checks to ensure that user's input is correct (actually it is assumed that the user should do the input sanitization). I will see if adding a length check is bothersome for performance or not :-) Or at least add something in the docs about this edge case. Keep in mind that RSCodec.encode() is meant to be used in a loop, so the less input checks we do, the faster it is!
from reedsolomon.
I didn't mean proposing to add a parameter sanity check. The arguments I provided seem valid to me - they describe RS codec with single-byte chunk and no error correction symbols. In my comprehension such codec should behave as identity for decoding and encoding operations.
... or I missed domain assertions for RS coding and nsyms=0, nsize=1
is not a valid RS actually.
Thank you for attention.
from reedsolomon.
@SupraSummus Thank you very much, I see what you mean. With the latest release, here is what we get now:
>>> c.decode(b'aaa')
(bytearray(b''), bytearray(b'aaa'), bytearray(b''))
Which means that the decoded message, which should just result in identity, is not considered as the message but as ecc symbols. This indeed looks weird, I should check inside the code, but I will probably have to dig back to the maths to understand what's happening here, but it's certainly very counterintuitive.
from reedsolomon.
Ok I think I understand what's happening here: if nsym is 0, the algo as implemented here will still try to get at least one ecc symbol, hence the input message is considered as the symbols and the message is considered empty, whereas you would expect the opposite.
I'll see how to best fix this issue, whether in the code or if we put a warning.
(TODO for me: add a unit test for this case)
from reedsolomon.
Related Issues (20)
- The current state of this module HOT 1
- The project description is inaccurate HOT 8
- Decoding a message composed of 4-bit words in GF(16) HOT 1
- Missing tag for 1.7.0 HOT 2
- Questions about two different results with the same coding target. HOT 1
- 1.7.0: pep517 is not building DSO `creedsolo` module HOT 10
- Question Possible Systematic Generator Matrix from field generator polynomial? HOT 1
- creedsolo.pyx fails to cythonize on 2.0.5 HOT 30
- 2.0.5: pep517 based build fails HOT 5
- docs: Cython version can not be installed HOT 5
- Encode parity shards HOT 2
- Generated correction symbols do not match those ones of MATLAB HOT 5
- rs_calc_syndromes could not find injected error HOT 1
- build: add automatic unit testing in ci-build github workflow for MicroPython
- How to correct errors with `creedsolo` (`2.1.2b1`)? HOT 3
- Using multiple instances of RSCodec fails
- Cython install/build fails
- Length of (message + ecc) be 255 vs 256? HOT 1
- Predicting RS encoded bytes size HOT 3
- Encoding/Decoding CCSDS (255,223) messages with reedsolomon HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reedsolomon.