View Single Post
Old 08-24-2012, 08:21 AM   #46
dilo_sec
Member
dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.dilo_sec ought to be getting tired of karma fortunes by now.
 
Posts: 20
Karma: 244219
Join Date: Jul 2011
Device: K3
Being naturally curious, I also dumped the pagemap section of my 2nd ebook - the start looks the same (these could be fixed values), the value at 0x0038 looks to denote the number of bits, 0010 (16-bit) or 0020 (32-bit), for the page offset values.

A dump of the pagemap is below, including part of the page-map.xml source - I've not figured what the text following "pageMap": means - it would not be needed during mobi unpacking to generate a page-map.xml.

-- start
0x0000: 50414745 PAGE

0x0004: 00000008 ?
0x0008: 00010001 ?
0x000C: 0000002A ?

0x0010: 0000 block 0?
0x0012: 001E size of block, 0x0032-0x0014 = 1E

0x0014: 7B0A {
0x0016: 2020 20226669 ... "fileRevisionId" : "1"
0x0030: 7D0A }

0x0032: 0001 block 1?
0x0034: 0079 size of block, 0x00B3-0x003A = 79
0x0036: 0183 pages in pagemap
0x0038: 0020 bits is page offset values

0x003A: 7B0A {
0x003C: 2020 20226465 ... "description" : "PageMap from source by kindlegen",
0x0073: 2020 20227061 ... "pageMap": "(1,c, |i),(3,r,2),(7,r,7),(10,r,11),(12,a,1)"
0x00B1: 7D0A }

0x00B3: 00000028 cover
0x00B7: 000025C0 i
0x00BA: 000028D5 ii
0x00BE: 00002C0F iii
<snip>
-- end pagemap

-- start
<page-map xmlns="http://www.idpf.org/2007/opf">
<page name=" " href="cover.html"/>
<page name="i" href="frontm.html"/>
<page name="ii" href="frontm.html#page_ii"/>
<page name="iii" href="frontm.html#page_iii"/>
<page name="iv" href="frontm.html#page_iv"/>
<page name="v" href="frontm.html#page_v"/>
<page name="vii" href="frontm.html#page_vii"/>
<page name="viii" href="frontm.html#page_viii"/>
<page name="ix" href="frontm.html#page_ix"/>
<page name="x" href="frontm.html#page_x"/>
<page name="xi" href="frontm.html#page_xi"/>
<page name="xii" href="frontm.html#page_xii"/>
<page name="1" href="chapter01.html"/>
<page name="2" href="chapter01.html#page_2"/>
<page name="3" href="chapter01.html#page_3"/>
<page name="4" href="chapter01.html#page_4"/>
<page name="5" href="chapter01.html#page_5"/>
<snip>
-- end page-map.xml

Last edited by dilo_sec; 08-24-2012 at 09:07 AM. Reason: fixed a wrong offset!
dilo_sec is offline   Reply With Quote