Difference between revisions of "ZIM file format"

Jump to navigation Jump to search
91 bytes added ,  15:54, 16 October 2010
Line 123: Line 123:
* 4 lzma2 (default compression format)  
* 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.
Support for zlib and bzip2 is deprecated. By default it is not compiled into the library any more. Only lzma2 is used. The zimlib uses [http://tukaani.org/xz/ xz-utils] as a C++ implementation of lzma2, for Java see [http://github.com/abartov/LZMA2-java LZMA2-java].
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