Difference between revisions of "ZIM file format"

Jump to navigation Jump to search
108 bytes added ,  14:05, 15 December 2020
m
no edit summary
(Change spec description to new namespace usage.)
m
Line 29: Line 29:
|-
|-
| titlePtrPos || integer || 40 || 8 || position of the directory pointerlist ordered by Title
| titlePtrPos || integer || 40 || 8 || position of the directory pointerlist ordered by Title
This is considered as obsolete, readers should use <code>X/listing/titleordered/v0</code> instead and fallback to <code>titlePtrPos</code> if entry is not present.
This is considered as obsolete, readers should use <code>[[Search indexes#Title index v0|X/listing/titleordered/v0]]</code> instead and fallback to <code>titlePtrPos</code> if entry is not present.


Always valid for now, but it may be set to 0 in the future if <code>titlePtrPos</code> is not present.                   
Always valid for now, but it may be set to 0 in the future if <code>titlePtrPos</code> is not present.                   
Line 75: Line 75:
The URL pointer list is a list of 8 byte offsets to the directory entries.
The URL pointer list is a list of 8 byte offsets to the directory entries.


The directory entries are always ordered by URL. Ordering is simply done by comparing the URL strings.
The directory entries are always ordered by "full" URL (<code><namespace><path></code>). Ordering is simply done by comparing the URL strings.


Since directory entries have variable sizes this is needed for random access.
Since directory entries have variable sizes this is needed for random access.
Line 94: Line 94:


== Title Pointer List (titlePtrPos) ==
== Title Pointer List (titlePtrPos) ==
The title pointer list is a list of entry indices ordered by title. The title pointer list actually points to entries in the URL pointer list.
The title pointer list is a list of entry indices ordered by title (<code><namespace><title></code>). 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 entry numbers.
Note that the title pointers are only 4 bytes. They are not offsets in the file but entry numbers.
31

edits

Navigation menu