{{lowercase title}} {{Short description|Data compression utility}} {{third-party|date=October 2013}} {{Infobox software | name = lzip | title = | logo = lzip.png | logo size = 150px | screenshot = <!-- File: --> | caption = | collapsible = | author = | developer = Antonio Diaz Diaz | released = {{Start date and age|2008}} | discontinued = | latest release version = 1.26 | latest release date = {{start date and age|2026|03|17}} | latest preview version = | latest preview date = | frequently updated = <!-- DO NOT include this parameter unless you know what it does --> | programming language = C++ or C | operating system = Unix-like, Windows, Android | platform = | size = | language = | status = | genre = Data compression | license = GPLv2+ (Free software) | website = {{URL|www.nongnu.org/lzip/}} }} {{Infobox file format | name = lzip | extension = .lz | mime = application/lzip | owner = Antonio Diaz Diaz | magic = 0x4C, 0x5A, 0x49, 0x50 | genre = Data compression | open = Yes }} '''lzip''' is a free, command-line tool for the compression of data; it employs the Lempel–Ziv–Markov chain algorithm (LZMA) with a user interface that is familiar to users of usual Unix compression tools, such as gzip and bzip2.

Like gzip and bzip2, concatenation is supported to compress multiple files, but the convention is to bundle a file that is an archive itself, such as those created by the tar or cpio Unix programs. Lzip can split the output for the creation of multivolume archives.

The file that is produced by lzip is usually given <code>.lz</code> as its filename extension, and the data is described by the media type <code>application/lzip</code>.

The lzip suite of programs was written in C++ and C by Antonio Diaz Diaz and is being distributed as free software under the terms of version 2 or later of the GNU General Public License (GPL).

==History== 7-Zip was released for Microsoft Windows in 2000; 7-Zip's LZMA algorithm first became available on Unix-like operating systems in 2004 when the command-line version of 7-Zip (<code>p7zip</code>) was ported. In the same year, the LZMA SDK became available, which included the <code>lzma_alone</code> program. Less than a year later, Lasse Collin released ''LZMA Utils'', a set of wrapper scripts implementing a gzip-like interface to <code>lzma_alone</code>. In 2008 Antonio Diaz Diaz released lzip, which uses a container format with checksums and magic numbers instead of the raw LZMA data stream, providing a complete Unix-style solution for using LZMA. In 2009 LZMA Utils was renamed to XZ Utils and implemented its own xz container format with similar features.<ref>{{citation|surname1=Brian Lindholm|periodical=Linux Gazette|title=New Options in the World of File Compression |issue=162|date= May 2009|language=de|url=http://linuxgazette.net/162/lindholm.html|access-date=2011-01-07}}</ref>

==Features==

===File integrity=== lzip is capable of creating archives with independently decompressible data sections called a "multimember archive" (as well as split output for the creation of multivolume archives).<ref name="manual-intro">{{cite web | title=Lzip Manual: Introduction |author=Antonio Diaz Diaz | url=http://lzip.nongnu.org/manual/lzip_manual.html#Introduction | quote=Lzip can produce multimember files and safely recover, with lziprecover, the undamaged members in case of file damage. Lzip can also split the compressed output in volumes of a given size, even when reading from standard input. This allows the direct creation of multivolume compressed tar archives. | date=2011-12-20}}</ref> For example, if the underlying file is a tar archive, this can allow extracting any undamaged files, even if other parts of the archive are damaged.

As for the file format, special emphasis has been put on enabling integrity checks by means of an integrated 32-bit checksum for each compressed stream;<ref>{{cite web | title=Lzip Manual: Introduction |author=Antonio Diaz Diaz | url=http://lzip.nongnu.org/manual/lzip_manual.html#Introduction | quote=As a self-check for your protection, lzip stores in the member trailer the 32-bit CRC of the original data and the size of the original data, to make sure that the decompressed version of the data is identical to the original. | date=2011-12-20}}</ref> this is used in combination with the lziprecover program to detect and reconstruct damaged data. This recovery tool can merge multiple copies of an archive where each copy may have damage in a different part of the file.<ref name="manual-intro"/>

===Parallelism=== lzip has two parallel interfaces provided in the default distribution.<ref>{{cite web |title=The lzip format |url=https://www.nongnu.org/lzip/lzip_talk_ghm_2019.html |website=www.nongnu.org}}</ref> * {{code|plzip}} compresses any file in a parallel way. Using it with {{code|tar}} is insufficient, since the conventional {{code|tar}} program needs the entire stream before a file to locate it for decompression, resulting in non-parallel extraction. * {{code|tarlz}} combines {{code|tar}} and {{code|lzip}} into a parallel archiver much like modern archivers like RAR or 7-Zip. The solid compression blocks align with {{code|tar}} file boundaries, so extracting a file only requires decompressing that particular member block.

==Adoption== === Availability === In popular Linux distributions, lzip can usually be installed from official package repositories.<ref>{{Cite web|url=https://packages.debian.org/search?keywords=lzip|title=Debian -- Package Search Results -- lzip|website=packages.debian.org}}</ref><ref>{{cite web |url=https://admin.fedoraproject.org/pkgdb/acls/name/lzip |title=Fedora Package Database -- lzip |access-date=2011-01-08 |url-status=dead |archive-url=https://web.archive.org/web/20110717001033/https://admin.fedoraproject.org/pkgdb/acls/name/lzip |archive-date=2011-07-17 }}</ref><ref>{{Cite web|url=https://software.opensuse.org/search?q=lzip|title=Search|website=software.opensuse.org}}</ref>

=== Support === * The GNU Autotools support lzip. Adding <code>dist-lzip</code> to <code>AM_INIT_AUTOMAKE</code> will build lzip-ed tarballs.<ref>{{Cite web|url=https://www.gnu.org/software/automake/manual/html_node/List-of-Automake-options.html|title=List of Automake options (automake)|website=www.gnu.org}}</ref> * Versions 1.23 and newer of GNU tar support using lzip to handle compressed files transparently.<ref>{{Cite web|url=http://www.gnu.org/software/tar/manual/html_node/gzip.html|title=GNU tar 1.32: 8.1.1 Creating and Reading Compressed Archives|website=www.gnu.org}}</ref> * GNOME's archiving tool, ''Archive Manager'', supports lzip files.

=== Application === * The Linux distribution ''Dragora GNU/Linux-Libre'' employs lzip for its software packages.<ref>{{cite web|url=https://lists.gnu.org/archive/html/info-gnu/2018-09/msg00011.html|title=Dragora 3.0-alpha2 released}}</ref> * Lzip is used to distribute the Time Zone Database from IANA,<ref>{{Cite web|url=https://www.iana.org/time-zones|title=IANA — Time Zone Database|website=www.iana.org}}</ref> and the GNU version of the Linux kernel.<ref>{{Cite web|url=http://www.linux-libre.fsfla.org/pub/linux-libre/releases/6.8.4-gnu/|title=Index of /gnu/linux-libre/4.x/4.12-gnu|website=ftp.gnu.org}}</ref> * Lzip is used in NASA's Planetary Data System (PDS).<ref>{{Cite web|url=https://pds.nasa.gov/datastandards/documents/dd/common/current/ch03s141.html|title=NASA PDS|website=pds.nasa.gov}}</ref>

==See also== {{Portal|Free and open-source software}} * Data recovery * Lossless data compression

==References== {{Reflist}}

==External links== * {{Official website}} * [https://www.nongnu.org/lzip/manual/lzip_manual.html#File-format Lzip format specification] * [https://datatracker.ietf.org/doc/html/draft-diaz-lzip Lzip format specification at IETF]

{{Archive formats}}

Category:Free data compression software