Reed-Solomon: encoding and decoding string has different length, any workaround for this?

285 Views Asked by At

I'm trying to transfer data between two processes. Problem is while transmitting the data, sometimes the receiver received more and sometimes fewer bits than the actual sending bits. Is there any workaround for this? or Is there any mechanism to which can handle adding or deletion bits from a bit string?

As there is a chance that multiple bits might flip while transmitting, I use the Reed-Solomon library, reedsolo for encoding the data before sending it. As my sending bit string and receiving bit string length doesn't match reed-Solomon throw error while I try to decode.

For example, I'm sending 143 bit as: 11010000110100100100111011101100101010101110001011111011100000010101010100001100011111111011010

and I'm receiving 142 bit as: 1101000011010010010011101110110010101010111000101111101110000001010101010000110001111111101101

and I'm receiving an error message as

Traceback (most recent call last):
File 

"/home/user/Downloads/experiment/reedsololib/decode.py", line 29, in <module>
decode = rs.decode(byteary)
File "/home/user/.local/lib/python3.6/site-packages/reedsolo.py", line 251, in decode
dec.extend(rs_correct_msg(chunk, self.nsym))
File "/home/user/.local/lib/python3.6/site-packages/reedsolo.py", line 213, in rs_correct_msg
raise ReedSolomonError("Could not locate error")
reedsolo.ReedSolomonError: Could not locate error
0

There are 0 best solutions below