Difference between revisions of "ZIM file format"

Jump to navigation Jump to search
584 bytes added ,  08:15, 17 October 2010
Line 57: Line 57:
Directory Entries are cached and always accessed via the URL pointer list.
Directory Entries are cached and always accessed via the URL pointer list.


== Title pointer list (titlePtrPos) ==
== Title Pointer List (titlePtrPos) ==
The title pointer list is a list of article indeces ordered by title. The title pointer list actually points to entries
in the URL pointer list. Note that the title pointers are only 4 bytes. They are not offsets in the file but article numbers.
To get the offset of an article from the title pointer list, you have to look it up in the URL pointer list.


Tie title pointer list is a list of article indexes ordered by title. The title pointer list actually points to entries
{|{{Prettytable}}
in the url pointer list. Note that the title pointers are only 4 bytes. They are not offsets in the file but article numbers.
! Field Name            !! Type    !!Offset!!Length!! Description
To get the offset of a article from the title pointer list, you have to look it up in the url pointer list.
|-
| <1st Title>            || integer ||    0 ||    4 || Pointer to the URL pointer of <1st Title>
|-
| <2nd Title>            || integer ||    4 ||    4 || Pointer to the URL pointer of <2nd Title>
|-
| <nth Title>            || integer ||(n-1)*4||  4 || Pointer to the URL pointer of <nth Title>
|-
| ...                    || integer || ...  ||    4 || ...
|}
 
As directoy entries are cached and accessed via URL this indirection from titles via URLs makes sure that the cache is always used.


== Cluster pointer list (clusterPtrPos) ==
== Cluster pointer list (clusterPtrPos) ==

Navigation menu