mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Change MOBI parsing to hopefully support more MOBI files
This commit is contained in:
parent
c46c23a2b2
commit
565dc2821f
@ -101,7 +101,7 @@ class BookHeader(object):
|
|||||||
if ident == 'TEXTREAD' or self.length < 0xE4 or 0xE8 < self.length:
|
if ident == 'TEXTREAD' or self.length < 0xE4 or 0xE8 < self.length:
|
||||||
self.extra_flags = 0
|
self.extra_flags = 0
|
||||||
else:
|
else:
|
||||||
self.extra_flags, = struct.unpack('>L', raw[0xF0:0xF4])
|
self.extra_flags, = struct.unpack('>H', raw[0xF2:0xF4])
|
||||||
|
|
||||||
if self.compression_type == 'DH':
|
if self.compression_type == 'DH':
|
||||||
self.huff_offset, self.huff_number = struct.unpack('>LL', raw[0x70:0x78])
|
self.huff_offset, self.huff_number = struct.unpack('>LL', raw[0x70:0x78])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user