Difference between revisions of "ZIM File Example"
Jump to navigation
Jump to search
Line 57: | Line 57: | ||
0000040: ffff ffff <u>ffff ffff</u> 0301 0000 0000 0000 ................ | 0000040: ffff ffff <u>ffff ffff</u> 0301 0000 0000 0000 ................ | ||
nor a layout page | nor a layout page | ||
0000040: ffff ffff ffff ffff <u>0301 0000 0000 0000</u> ................ | |||
a md5 checksum can be found at 0000 0000 0000 0103 |
Revision as of 20:18, 8 May 2011
Example of a small zim file
0000000: 5a49 4d04 0500 0000 0998 0d07 1f75 e653 ZIM..........u.S 0000010: 7106 3faf 3c40 cba1 0200 0000 0100 0000 q.?.<@.......... 0000020: 6600 0000 0000 0000 7600 0000 0000 0000 f.......v....... 0000030: aa00 0000 0000 0000 5000 0000 0000 0000 ........P....... 0000040: ffff ffff ffff ffff 0301 0000 0000 0000 ................ 0000050: 7465 7874 2f68 746d 6c00 7465 7874 2f70 text/html.text/p 0000060: 6c61 696e 0000 7e00 0000 0000 0000 9400 lain..~......... 0000070: 0000 0000 0000 0000 0000 0100 0000 0000 ................ 0000080: 0041 ff7f 0000 0000 0000 0000 0000 4175 .A............Au 0000090: 746f 0000 0100 0042 ff7f 0000 0000 0000 to.....B........ 00000a0: 0100 0000 4175 746f 0000 b200 0000 0000 ....Auto........ 00000b0: 0000 04fd 377a 585a 0000 0169 22de 3602 ....7zXZ...i".6. 00000c0: 0021 0110 0000 00a8 708e 86e0 001c 0018 .!......p....... 00000d0: 5e00 0600 34fb de91 72a3 8034 fc31 871f ^...4...r..4.1.. 00000e0: e6aa 6104 7025 b184 dc00 00e1 66f9 e700 ..a.p%......f... 00000f0: 0130 1d01 efc6 9c90 4299 0d01 0000 0000 .0......B....... 0000100: 0159 5ad1 9082 7bd5 8044 a46a 5b3e c865 .YZ...{..D.j[>.e 0000110: d843 24 .C$
Header
0000000: 5a49 4d04 0500 0000 0998 0d07 1f75 e653 ZIM..........u.S
This is the magic number 72173914, which is in hex 44D495A and since all data is little endian, the result is this 5a49 4d04.
0000000: 5a49 4d04 0500 0000 0998 0d07 1f75 e653 ZIM..........u.S
This is the major version number 5
0000000: 5a49 4d04 0500 0000 0998 0d07 1f75 e653 ZIM..........u.S
and the minor version number 0
0000000: 5a49 4d04 0500 0000 0998 0d07 1f75 e653 ZIM..........u.S 0000010: 7106 3faf 3c40 cba1 0200 0000 0100 0000 q.?.<@..........
the uuid
0000010: 7106 3faf 3c40 cba1 0200 0000 0100 0000 q.?.<@..........
the file has 2 articles
0000010: 7106 3faf 3c40 cba1 0200 0000 0100 0000 q.?.<@..........
and one cluster
0000020: 6600 0000 0000 0000 7600 0000 0000 0000 f.......v.......
you will find the url pointer list at offset 0000 0000 0000 0066
0000020: 6600 0000 0000 0000 7600 0000 0000 0000 f.......v.......
the title pointer list follows at offset 0000 0000 0000 0076
0000030: aa00 0000 0000 0000 5000 0000 0000 0000 ........P.......
the cluster pointer list can be found at offset 0000 0000 0000 00aa
0000030: aa00 0000 0000 0000 5000 0000 0000 0000 ........P.......
a list of used mime types is at offset 0000 0000 0000 0050
0000040: ffff ffff ffff ffff 0301 0000 0000 0000 ................
no main page is defined here
0000040: ffff ffff ffff ffff 0301 0000 0000 0000 ................
nor a layout page
0000040: ffff ffff ffff ffff 0301 0000 0000 0000 ................
a md5 checksum can be found at 0000 0000 0000 0103