109
edits
Line 25: | Line 25: | ||
0000000: 5a49 4d04 <u>0500</u> 0000 0998 0d07 1f75 e653 ZIM..........u.S | 0000000: 5a49 4d04 <u>0500</u> 0000 0998 0d07 1f75 e653 ZIM..........u.S | ||
The major version number of the zim format is 5... | |||
0000000: 5a49 4d04 0500 <u>0000</u> 0998 0d07 1f75 e653 ZIM..........u.S | 0000000: 5a49 4d04 0500 <u>0000</u> 0998 0d07 1f75 e653 ZIM..........u.S | ||
and the minor version number 0 | ...and the minor version number is 0. | ||
0000000: 5a49 4d04 0500 0000 <u>0998 0d07 1f75 e653</u> ZIM..........u.S | 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.?.<@.......... | 0000010: <u>7106 3faf 3c40 cba1</u> 0200 0000 0100 0000 q.?.<@.......... | ||
The uuid. | |||
0000010: 7106 3faf 3c40 cba1 <u>0200 0000</u> 0100 0000 q.?.<@.......... | 0000010: 7106 3faf 3c40 cba1 <u>0200 0000</u> 0100 0000 q.?.<@.......... | ||
The file has 2 articles. | |||
0000010: 7106 3faf 3c40 cba1 0200 0000 <u>0100 0000</u> q.?.<@.......... | 0000010: 7106 3faf 3c40 cba1 0200 0000 <u>0100 0000</u> q.?.<@.......... | ||
And one cluster. | |||
0000020: <u>6600 0000 0000 0000</u> 7600 0000 0000 0000 f.......v....... | 0000020: <u>6600 0000 0000 0000</u> 7600 0000 0000 0000 f.......v....... | ||
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....... | 0000020: 6600 0000 0000 0000 <u>7600 0000 0000 0000</u> f.......v....... | ||
The title pointer list follows at offset 0000 0000 0000 0076. | |||
0000030: <u>aa00 0000 0000 0000</u> 5000 0000 0000 0000 ........P....... | 0000030: <u>aa00 0000 0000 0000</u> 5000 0000 0000 0000 ........P....... | ||
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....... | 0000030: aa00 0000 0000 0000 <u>5000 0000 0000 0000</u> ........P....... | ||
A list of used mime types is at offset 0000 0000 0000 0050. | |||
0000040: <u>ffff ffff</u> ffff ffff 0301 0000 0000 0000 ................ | 0000040: <u>ffff ffff</u> ffff ffff 0301 0000 0000 0000 ................ | ||
No main page is defined here... | |||
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> ................ | 0000040: ffff ffff ffff ffff <u>0301 0000 0000 0000</u> ................ | ||
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. |