mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-06 16:22:24 +01:00
Fix minor error in Palmdoc compression implementation.
This commit is contained in:
parent
937cbdb20e
commit
fc59f7b63d
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Reference in a new issue