Closed henla464 closed 1 year ago
Changing the check function in creedsolo.pyx to the below code seem to fix the issue.
def check(self, data, nsym=None):
'''Check if a message+ecc stream is not corrupted (or fully repaired). Note: may return a wrong result if number of errors > nsym.'''
if not nsym:
nsym = self.nsym
if isinstance(data, str):
data = bytearray(data)
check = []
for i in xrange(0, len(data), self.nsize):
# Split the long message in a chunk
chunk = data[i:i+self.nsize]
check.append(rs_check(chunk, nsym, fcr=self.fcr, generator=self.generator))
return check
You are totally right, thank you very much, next time open a PR so you can be directly credited, but I mentioned you in the commit, have a great day!
I tried to use cython and installed with
sudo python3 setup.py install --native-compile
Installation seem to have worked but I get this error calling the check method:
File "creedsolo.pyx", line 870, in creedsolo.RSCodec.check AttributeError: 'RSCodec' object has no attribute 'chunk'
Am I doing something wrong?