Debian Codegraph @

format_docs/pdb/apnx.txt

raw
1 APNX
2 ----
3
4 apnx files are used by the Amazon Kindle (firmware revision 3.1+) to
5 map pages from a print book to the Kindle version. Integers within
6 the file are big-endian.
7
8
9 Layout
10 ------
11
12 bytes content comments
13
14 4 00010001 Format identifier. Value of 65537 little-endian.
15 4 start of next The offset after ending location of the first header.
16 Starts a new sequence of header info
17 4 length Length of first header
18 N first header String containing content header
19 Starts next sequence
20 2 unknown Always 1
21 2 length Length of second header
22 2 page count Total number of bytes after second header that
23 represent pages. This total includes bytes that
24 are ignored by the pageMap.
25 2 unknown Always 32
26 N second header String containing the page mapping header
27 4*N padding The first number given in the page mapping header indicates the number of 0 bytes.
28 4*N page list
29
30
31 Content Header
32 --------------
33
34 The content header is a string enclosed in {} containing key, value pairs.
35
36 content comments
37
38 contentGuid Guid.
39 asin Amazon identifier for the Kindle version of the book.
40 cdeType MOBI cdeType. Should always be EBOK for ebooks.
41 fileRevisionId Revision of this file.
42
43 Example:
44 {"contentGuid":"d8c14b0","asin":"B000JML5VM","cdeType":"EBOK","fileRevisionId":"1296874359405"}
45
46
47 In devices with KF8 support, we're seeing an extended content header (which seems to be required by some FW versions for KF8 files, like FW 3.4):
48
49 format Mobi version. MOBI_8 for KF8, MOBI_7 for legacy mobi files.
50 acr Palm DB name
51
52 Example:
53 {"contentGuid":"f2fc7597","asin":"B003M68YKM","cdeType":"EBOK","format":"MOBI_8","fileRevisionId":"1342776186889","acr":"CR!1F5WDHWWVN4Y78MA87Z13H9K6RKE"}
54
55 Page Mapping Header
56 -------------------
57
58 The page mapping header is a string enclosed in {} containing key, value pairs.
59
60 content comments
61
62 asin The ISBN 10 for the paper book the pages correspond to
63 pageMap Three value tuple. Looks like: "(N,N,N)"
64 1) 1 based page list entry number for the first page described by this tuple.
65 2) Page number type, a: Indo-Arabic numeral, r: Roman numeral, c: character.
66 3) Value of page number for the first page of this sequence.
67
68 The third value of the tuple is a decimal number if the type is "a" or "r" and
69 a character string of page labels separated by "|" characters.
70
71 Example:
72 {"asin":"1906694184","pageMap":"(4,a,1),(197,c,A-1|A-2|A-3)"}
73
74
75 Page List
76 ---------
77
78 The page list is a sequence of offsets in the uncompressed HTML. Each
79 value is the beginning of a new page. Each entry is a 4 byte big endian
80 int. The list is ordered lowest to highest.
81
82 For more information
83 --------------------
84
85 MobileRead wiki https://wiki.mobileread.com/wiki/APNX