109
edits
Line 1: | Line 1: | ||
==Example of a small zim file== | ==Example of a small zim file== | ||
0000000: 5a49 4d04 0500 0000 | 0000000: 5a49 4d04 0500 0000 3803 66de 7f7a d95d ZIM.....8.f..z.] | ||
0000010: | 0000010: d81c 7f3d ee01 7596 0200 0000 0100 0000 ...=..u......... | ||
0000020: 6600 0000 0000 0000 7600 0000 0000 0000 f.......v....... | 0000020: 6600 0000 0000 0000 7600 0000 0000 0000 f.......v....... | ||
0000030: aa00 0000 0000 0000 5000 0000 0000 0000 ........P....... | 0000030: aa00 0000 0000 0000 5000 0000 0000 0000 ........P....... | ||
Line 9: | Line 9: | ||
0000060: 6c61 696e 0000 7e00 0000 0000 0000 9400 lain..~......... | 0000060: 6c61 696e 0000 7e00 0000 0000 0000 9400 lain..~......... | ||
0000070: 0000 0000 0000 0000 0000 0100 0000 0000 ................ | 0000070: 0000 0000 0000 0000 0000 0100 0000 0000 ................ | ||
0000080: 0041 | 0000080: 0041 0000 0000 0000 0000 0000 0000 4175 .A............Au | ||
0000090: 746f 0000 0100 0042 | 0000090: 746f 0000 0100 0042 0000 0000 0000 0000 to.....B........ | ||
00000a0: 0100 0000 4175 746f 0000 b200 0000 0000 ....Auto........ | 00000a0: 0100 0000 4175 746f 0000 b200 0000 0000 ....Auto........ | ||
00000b0: 0000 04fd 377a 585a 0000 0169 22de 3602 ....7zXZ...i".6. | 00000b0: 0000 04fd 377a 585a 0000 0169 22de 3602 ....7zXZ...i".6. | ||
Line 17: | Line 17: | ||
00000e0: e6aa 6104 7025 b184 dc00 00e1 66f9 e700 ..a.p%......f... | 00000e0: e6aa 6104 7025 b184 dc00 00e1 66f9 e700 ..a.p%......f... | ||
00000f0: 0130 1d01 efc6 9c90 4299 0d01 0000 0000 .0......B....... | 00000f0: 0130 1d01 efc6 9c90 4299 0d01 0000 0000 .0......B....... | ||
0000100: 0159 | 0000100: 0159 5a78 bdf4 58bd 108c 16c6 9ef5 d42c .YZx..X........, | ||
0000110: | 0000110: a3f4 e3 ... | ||
==Header== | ==Header== | ||
Line 61: | Line 61: | ||
A md5 checksum of the file until that can be found at 0000 0000 0000 0103. | A md5 checksum of the file until that can be found at 0000 0000 0000 0103. | ||
==Mime type list== | |||
0000050: <u>7465 7874 2f68 746d 6c00 7465 7874 2f70</u> text/html.text/p | 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..~......... | 0000060: <u>6c61 696e 0000</u> 7e00 0000 0000 0000 9400 lain..~......... | ||
Line 73: | Line 74: | ||
After the last mime type, a single zero byte follows. | After the last mime type, a single zero byte follows. | ||
0000060: 6c61 696e 0000 <u>7e00 0000 0000 0000 9400 lain..~......... | ==Url pointer list== | ||
0000070: 0000 0000 0000</u> 0000 0000 0100 0000 0000 ................ | 0000060: 6c61 696e 0000 <u>7e00 0000 0000 0000 9400</u> lain..~......... | ||
0000070: <u>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. | 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. | ||
==Title pointer list== | |||
0000070: 0000 0000 0000 <u>0000 0000 0100 0000</u> 0000 ................ | 0000070: 0000 0000 0000 <u>0000 0000 0100 0000</u> 0000 ................ | ||
Here is the title pointer list. | Here is the title pointer list. | ||
Line 86: | Line 89: | ||
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. | 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. | ||
==Directory entry== | |||
0000070: 0000 0000 0000 0000 0000 0100 0000 <u>0000</u> ................ | 0000070: 0000 0000 0000 0000 0000 0100 0000 <u>0000</u> ................ | ||
0000080: 0041 | 0000080: <u>0041 0000 0000 0000 0000 0000 0000 4175</u> .A............Au | ||
0000090: 746f 0000</u> 0100 0042 ff7f 0000 0000 0000 to.....B........ | 0000090: <u>746f 0000</u> 0100 0042 ff7f 0000 0000 0000 to.....B........ | ||
This is the first directory entry at 007e. | This is the first directory entry at 007e. | ||
0000070: 0000 0000 0000 0000 0000 0100 0000 <u>0000</u> ................ | |||
The article has the 0th mime type from the list, which is "text/html". | |||
0000080: 00<u>41</u> 0000 0000 0000 0000 0000 0000 4175</u> .<u>A</u>............Au | |||
The namespace of the article is 'A'. | |||
0000080: 0041 <u>0000 0000</u> 0000 0000 0000 0000 4175 .A............Au | |||
The version is 0000 0000. | |||
0000080: 0041 0000 0000 <u>0000 0000</u> 0000 0000 4175 .A............Au | |||
The data can be found in cluster 0. | |||
0000080: 0041 0000 0000 0000 0000 <u>0000 0000</u> 4175 .A............Au | |||
And it is the 0th blob in the cluster. |