Changes

Jump to: navigation, search

ZIM File Example

1,957 bytes added, 20:37, 8 May 2011
no edit summary
0000000: 5a49 4d04 <u>0500</u> 0000 0998 0d07 1f75 e653 ZIM..........u.S
This is the The major version number of the zim format is 5...
0000000: 5a49 4d04 0500 <u>0000</u> 0998 0d07 1f75 e653 ZIM..........u.S
...and the minor version number is 0.
0000000: 5a49 4d04 0500 0000 <u>0998 0d07 1f75 e653</u> ZIM..........u.S
0000010: <u>7106 3faf 3c40 cba1</u> 0200 0000 0100 0000 q.?.<@..........
the The uuid.
0000010: 7106 3faf 3c40 cba1 <u>0200 0000</u> 0100 0000 q.?.<@..........
the The file has 2 articles.
0000010: 7106 3faf 3c40 cba1 0200 0000 <u>0100 0000</u> q.?.<@..........
and And one cluster.
0000020: <u>6600 0000 0000 0000</u> 7600 0000 0000 0000 f.......v.......
you You will find the url pointer list at offset 0000 0000 0000 0066.
0000020: 6600 0000 0000 0000 <u>7600 0000 0000 0000</u> f.......v.......
the The title pointer list follows at offset 0000 0000 0000 0076.
0000030: <u>aa00 0000 0000 0000</u> 5000 0000 0000 0000 ........P.......
the The cluster pointer list can be found at offset 0000 0000 0000 00aa.
0000030: aa00 0000 0000 0000 <u>5000 0000 0000 0000</u> ........P.......
a A list of used mime types is at offset 0000 0000 0000 0050.
0000040: <u>ffff ffff</u> ffff ffff 0301 0000 0000 0000 ................
no No main page is defined here...
0000040: ffff ffff <u>ffff ffff</u> 0301 0000 0000 0000 ................
...nor a layout page.
0000040: ffff ffff ffff ffff <u>0301 0000 0000 0000</u> ................
a A md5 checksum of the file until that can be found at 0000 0000 0000 0103.  0000050: <u>7465 7874 2f68 746d 6c00 7465 7874 2f70</u> text/html.text/p 0000060: <u>6c61 696e 0000</u> 7e00 0000 0000 0000 9400 lain..~.........As seen the mime type list starts at 0000 0000 0000 0050.  0000050: <u>7465 7874 2f68 746d 6c00</u> 7465 7874 2f70 text/html.text/p 0000060: 6c61 696e 0000 7e00 0000 0000 0000 9400 lain..~.........Mime types are zero terminated.  0000050: 7465 7874 2f68 746d 6c00 7465 7874 2f70 text/html.text/p 0000060: 6c61 696e 00<u>00</u> 7e00 0000 0000 0000 9400 lain..~.........After the last mime type, a single zero byte follows.  0000060: 6c61 696e 0000 <u>7e00 0000 0000 0000 9400 lain..~......... 0000070: 0000 0000 0000</u> 0000 0000 0100 0000 0000 ................The url pointer list starting at 0000 0000 0000 0066 has 2 pointers to the 2 directory entries of the 2 articles. The list is ordered by the url of the article. The first directory entry can be found at 0000 0000 0000 007e and the second at 0000 0000 0000 0094.  0000070: 0000 0000 0000 <u>0000 0000 0100 0000</u> 0000 ................Here is the title pointer list.  0000070: 0000 0000 0000 <u>0000 0000</u> 0100 0000 0000 ................When ordering by title, the article number 0 is the first. This actually refers to the 0th article in the url pointer list. To find the directory entry of the article, you have to look up the offset in the url pointer list.  0000070: 0000 0000 0000 0000 0000 <u>0100 0000</u> 0000 ................When ordering by title, the article number 1 is the second. The offset to the directory entry can be found at (url-pointer-list + 1*sizeof(pointer))=0066+1*8=006E.  0000070: 0000 0000 0000 0000 0000 0100 0000 <u>0000</u> ................ 0000080: 0041 ff7f 0000 0000 0000 0000 0000 4175 .A............Au 0000090: 746f 0000</u> 0100 0042 ff7f 0000 0000 0000 to.....B........This is the first directory entry at 007e.

Navigation menu