Lzlib

 [lzlib logo]

Introduction

Lzlib is a data compression library providing in-memory LZMA compression and decompression functions, including integrity checking of the decompressed data. The compressed data format used by the library is the lzip format. Lzlib is written in C.

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.

The functions and variables forming the interface of the compression 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.

Compression/decompression is done by repeatedly calling a couple of 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.

Lzlib will correctly decompress a data stream which is the concatenation of two or more compressed data streams. The result is the concatenation of the corresponding decompressed data streams. Integrity testing of 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 chain-Algorithm) algorithm. The original LZMA algorithm was designed by Igor Pavlov. For a description of the LZMA algorithm, see the lzip manual.

Learn more about lzip in the Lzip Home Page.

Documentation

The manual is available in the info system of the GNU Operating System. Use info to access the top level info page. Use info lzlib to access the lzlib section directly.

An online manual for lzlib can be found here.

Download

The latest released version of lzlib can be found here. You may also subscribe to Freecode and receive an email every time a new version is released.

How to Get Help

For general discussion of bugs in lzlib the mailing list lzip-bug@nongnu.org is the most appropriate forum. Please send messages as plain text. Please do not send messages encoded as HTML nor encoded as base64 MIME nor included as multiple formats. Please include a descriptive subject line. If all of the subject are "bug in lzlib" it is impossible to differentiate them.

An archive of the bug report mailing list is available at http://lists.nongnu.org/mailman/listinfo/lzip-bug.

How to Help

To contact the author, either to report a bug or to contribute fixes or improvements, send mail to lzip-bug@nongnu.org. Please send messages as plain text. If posting patches they should be in unified diff format against the latest version. They should include a text description.

See also the lzip project page at Savannah.

Licensing

This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

As a special exception, you may use this free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this library, or you compile this library and link it with other files to produce an executable, this library does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License.

Valid HTML 4.01!


Copyright © 2013 Antonio Diaz Diaz
Lzlib logo Copyright © 2013 Sonia Diaz Pacheco

You are free to copy, modify and distribute all or part of this article without limitation.

Updated: 2013/07/26