mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix minor error in Palmdoc compression implementation.
This commit is contained in:
parent
937cbdb20e
commit
fc59f7b63d
@ -74,12 +74,13 @@ def compress_doc(data):
|
||||
else:
|
||||
j = i
|
||||
binseq = [ch]
|
||||
while True:
|
||||
while j < ldata:
|
||||
ch = data[j]
|
||||
och = ord(ch)
|
||||
if och < 1 or (och > 8 and och < 0x80):
|
||||
break
|
||||
binseq.append(ch)
|
||||
j += 1
|
||||
out.write(pack('>B', len(binseq)))
|
||||
out.write(''.join(binseq))
|
||||
i += len(binseq) - 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user