How to manage shifting?
Closed this issue · 2 comments
dridk commented
In a sequence, I can have one or more byte disappear or appear, thus shifting the whole sequence.
For example :
from reedsolo import RSCodec, ReedSolomonError
rsc = RSCodec(12)
p = rsc.encode(b 'hello world')
# remove symbol 4th
del p[4]
rsc.decode(p) # doesht work
is there a way the manage this kind of error ?
dridk commented
in reality, it's at the level of the binary sequence that I have the addition and deletion of a bit.
If you have any ideas in both case, I'd love to hear from you.
lrq3000 commented
Unfortunately deletions and additions are a whole other kind of theoretical problem. There exists some error correcting codes that do support these types of errors but they are in general much less effective, they cannot offer as strong mathematical guarantees of recovery as without these.
In any case, this library does not suppord these types of errors, so you will need to find something else, or a workaround for your specific problem to identify where these errors are and replace them by a null byte.
7 sept. 2024 10:22:51 sacha schutz ***@***.***>:
…
In a sequence, I can have one or more byte disappear or appear, thus shifting the whole sequence.
For example :
from reedsolo import RSCodec, ReedSolomonError
rsc = RSCodec(12)
p = rsc.encode(b 'hello world')
# remove
del p[4]
rsc.decode(p) # doesht work
is there a way the manage this kind of error ?
—
Reply to this email directly, view it on GitHub[#82], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAIRFXWNOVFLYR4U2IHPPZLZVKZVXAVCNFSM6AAAAABNZ2JSOOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYTCNJTHA2DEOI].
You are receiving this because you are subscribed to this thread.
[Image de pistage][https://github.com/notifications/beacon/AAIRFXTGDVKGOWNZBVYI3NDZVKZVXA5CNFSM6AAAAABNZ2JSOOWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHJLMYI7U.gif]