2025-02-20 15:51:30 +01:00
|
|
|
Description
|
|
|
|
|
2025-02-20 16:01:38 +01:00
|
|
|
Lzlib is a data compression library providing in-memory LZMA compression
|
|
|
|
and decompression functions, including integrity checking of the
|
2025-02-20 16:49:45 +01:00
|
|
|
decompressed data. The compressed data format used by the library is the
|
2025-02-20 19:59:10 +01:00
|
|
|
lzip format. Lzlib is written in C.
|
2025-02-20 15:51:30 +01:00
|
|
|
|
2025-02-20 20:18:02 +01:00
|
|
|
The lzip file format is designed for long-term data archiving. It is
|
|
|
|
clean, provides very safe 4 factor integrity checking, and is backed by
|
|
|
|
the recovery capabilities of lziprecover.
|
|
|
|
|
2025-02-20 15:51:30 +01:00
|
|
|
The functions and variables forming the interface of the compression
|
2025-02-20 20:21:13 +01:00
|
|
|
library are declared in the file 'lzlib.h'. Usage examples of the
|
|
|
|
library are given in the files 'main.c' and 'bbexample.c' from the
|
|
|
|
source distribution.
|
2025-02-20 15:51:30 +01:00
|
|
|
|
2025-02-20 16:49:45 +01:00
|
|
|
Compression/decompression is done by repeatedly calling a couple of
|
2025-02-20 15:51:30 +01:00
|
|
|
read/write functions until all the data has been processed by the
|
|
|
|
library. This interface is safer and less error prone than the
|
|
|
|
traditional zlib interface.
|
|
|
|
|
2025-02-20 19:59:10 +01:00
|
|
|
Compression/decompression is done when the read function is called. This
|
|
|
|
means the value returned by the position functions will not be updated
|
|
|
|
until some data is read, even if you write a lot of data. If you want
|
|
|
|
the data to be compressed in advance, just call the read function with a
|
|
|
|
size equal to 0.
|
|
|
|
|
2025-02-20 15:51:30 +01:00
|
|
|
Lzlib will correctly decompress a data stream which is the concatenation
|
|
|
|
of two or more compressed data streams. The result is the concatenation
|
2025-02-20 16:49:45 +01:00
|
|
|
of the corresponding decompressed data streams. Integrity testing of
|
2025-02-20 15:51:30 +01:00
|
|
|
concatenated compressed data streams is also supported.
|
|
|
|
|
|
|
|
All the library functions are thread safe. The library does not install
|
|
|
|
any signal handler. The decoder checks the consistency of the compressed
|
|
|
|
data, so the library should never crash even in case of corrupted input.
|
|
|
|
|
|
|
|
Lzlib implements a simplified version of the LZMA (Lempel-Ziv-Markov
|
2025-02-20 20:18:02 +01:00
|
|
|
chain-Algorithm) algorithm. The high compression of LZMA comes from
|
|
|
|
combining two basic, well-proven compression ideas: sliding dictionaries
|
|
|
|
(LZ77/78) and markov models (the thing used by every compression
|
|
|
|
algorithm that uses a range encoder or similar order-0 entropy coder as
|
|
|
|
its last stage) with segregation of contexts according to what the bits
|
|
|
|
are used for.
|
|
|
|
|
|
|
|
The ideas embodied in lzlib are due to (at least) the following people:
|
|
|
|
Abraham Lempel and Jacob Ziv (for the LZ algorithm), Andrey Markov (for
|
|
|
|
the definition of Markov chains), G.N.N. Martin (for the definition of
|
|
|
|
range encoding), Igor Pavlov (for putting all the above together in
|
|
|
|
LZMA), and Julian Seward (for bzip2's CLI).
|
2025-02-20 15:51:30 +01:00
|
|
|
|
|
|
|
|
2025-02-20 20:21:13 +01:00
|
|
|
Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Antonio Diaz Diaz.
|
2025-02-20 15:51:30 +01:00
|
|
|
|
|
|
|
This file is free documentation: you have unlimited permission to copy,
|
|
|
|
distribute and modify it.
|
|
|
|
|
|
|
|
The file Makefile.in is a data file used by configure to produce the
|
2025-02-20 16:49:45 +01:00
|
|
|
Makefile. It has the same copyright owner and permissions that configure
|
|
|
|
itself.
|