Lunzip

lzip logo

Introduction

Lunzip is a decompressor for the lzip format written in C. Its small size makes it well suited for embedded devices or software installers that need to decompress files but don't need compression capabilities.

The lzip file format is designed for data sharing and long-term archiving, taking into account both data integrity and decoder availability:

A nice feature of the lzip format is that a corrupt byte is easier to repair the nearer it is from the beginning of the file. Therefore, with the help of lziprecover, losing an entire archive just because of a corrupt byte near the beginning is a thing of the past.

Lunzip uses the same well-defined exit status values used by bzip2, which makes it safer than decompressors returning ambiguous warning values (like gunzip) when it is used as a back end for other programs like tar or zutils.

Lunzip provides a 'low memory' mode able to decompress any file using as little memory as 50 kB, irrespective of the dictionary size used to compress the file. To activate it, specify the size of the output buffer with the option '--buffer-size' and lunzip will use the decompressed file as dictionary for distances beyond the buffer size. Of course, the larger the difference between the buffer size and the dictionary size, the more accesses to disk are needed and the slower the decompression is. This 'low memory' mode only works when decompressing to a regular file and is intended for systems without enough memory (RAM + swap) to keep the whole dictionary at once. It has been tested on a laptop with a 486 processor and 4 MiB of RAM.

The amount of memory required by lunzip to decompress a file is about 46 kB larger than the dictionary size used to compress that file, unless '--buffer-size' is specified.

Decompressing a file is much like copying or moving it. Therefore lunzip preserves the access and modification dates, permissions, and, if you have appropriate privileges, ownership of the file just as 'cp -p' does. (If the user ID or the group ID can't be duplicated, the file permission bits S_ISUID and S_ISGID are cleared).

Lunzip is able to read from some types of non-regular files if either the option '-c' or the option '-o' is specified.

If no file names are specified, lunzip decompresses from standard input to standard output. In this case, lunzip refuses to read compressed input from a terminal, as this might leave the terminal in an abnormal state.

Lunzip correctly decompresses a file which is the concatenation of two or more compressed files. The result is the concatenation of the corresponding uncompressed files. Integrity testing of concatenated compressed files is also supported.

Documentation

Lunzip only includes a man page and a README file. For information about the lzip file format see the online manual of lzip below.

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

An online manual for lzip can be found at manual/lzip_manual.html.

Download

The latest released version of lunzip can be found at http://download.savannah.gnu.org/releases/lzip/lunzip/. You may also subscribe to lzip-bug and receive an email every time a new version is released.

You may compile and optionally install lunzip by running the following commands:

tar -xf lunzip[version].tar.gz
cd lunzip[version] && ./configure && make check

then (as root) type:

make install

Once lunzip is installed, the files from archive "foo.tar.lz" can be extracted using the command "lunzip -cd foo.tar.lz | tar -xf -".

How to get help

For general discussion of bugs in lunzip 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 lunzip" it is impossible to differentiate them.

An archive of the bug report mailing list is available at http://lists.gnu.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

Lunzip 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 2 of the License, or (at your option) any later version.

Valid HTML 4.01 Strict


Copyright © 2024 Antonio Diaz Diaz
Lzip logo Copyright © 2013 Sonia Diaz Pacheco

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

Updated: 2024-11-17

This page does not use javascript.