Difference between revisions of "ZIM file format"
Jump to navigation
Jump to search
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 | == 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. | |||
{|{{Prettytable}} | |||
! Field Name !! Type !!Offset!!Length!! Description | |||
|- | |||
| <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) == |