Difference between revisions of "ZIM file format"

Jump to navigation Jump to search
101 bytes added ,  20:59, 13 September 2010
Line 118: Line 118:
* 0 default (no compression)
* 0 default (no compression)
* 1 none also no compression (inherited from zeno)
* 1 none also no compression (inherited from zeno)
* 2 zip (zlib)
* 2 zlib
* 3 bzip2 (currently used in writer)
* 3 bzip2
* 4 lzma (not implemented in reader or writer due to lack of compression library)
* 4 lzma2 (default compression format)
 
Support for zlib and bzip2 is deprecated. By default it is not compiled into the library any more. Only lzma2 is used.
For this the [http://tukaani.org/xz/ xz-utils] are used.


The data area has a list of 4 byte offsets to the blobs counting from the first offset. The offset addresses uncompressed data. The last pointer points to the end of the data area. So there is always one more offset than blobs. Since the first offset points to the start of the first data, the number of offsets can be determined by dividing this offset by 4. The size of one blob is calculated by the difference of two consecutive offsets.
The data area has a list of 4 byte offsets to the blobs counting from the first offset. The offset addresses uncompressed data. The last pointer points to the end of the data area. So there is always one more offset than blobs. Since the first offset points to the start of the first data, the number of offsets can be determined by dividing this offset by 4. The size of one blob is calculated by the difference of two consecutive offsets.

Navigation menu