mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
37ac80e2ca
commit
542bb7b81b
@ -987,17 +987,26 @@ class TBSIndexing(object): # {{{
|
||||
arg3, consumed = decint(byts)
|
||||
byts = byts[consumed:]
|
||||
fsi = arg3 >> 4
|
||||
extra = arg3 & 0b1111
|
||||
flags = arg3 & 0b1111
|
||||
ans.append('First section index (fvwi): %d'%fsi)
|
||||
psi = self.get_index(fsi)
|
||||
ans.append('Extra bits (flag: always 0?): %d'%extra)
|
||||
ans.append('Flags (flag: always 0?): %d'%flags)
|
||||
if flags == 4:
|
||||
ans.append('Number of articles in this section: %d'%byts[0])
|
||||
byts = byts[1:]
|
||||
elif flags == 0:
|
||||
pass
|
||||
else:
|
||||
raise ValueError('Unknown flags value: %d'%flags)
|
||||
|
||||
|
||||
if byts:
|
||||
byts = tbs_type_6(byts, psi=psi,
|
||||
msg=('First article of ending section, relative to its'
|
||||
' parent\'s index'),
|
||||
fmsg=('->Offset from start of record to beginning of'
|
||||
' last starting section'))
|
||||
while True:
|
||||
while byts:
|
||||
# We have a transition not just an opening first section
|
||||
psi = self.get_index(psi.index+1)
|
||||
arg, consumed = decint(byts)
|
||||
|
Loading…
x
Reference in New Issue
Block a user