|Original author(s)||Lasse Collin|
|Developer(s)||The Tukaani Project|
5.2.4 / April 29, 2018
|License||Mostly public domain, some LGPLv2.1, GPLv2, GPLv3|
XZ Utils consists of two major components:
- xz, the command-line compressor and decompressor (analogous to gzip)
- liblzma, a software library with an API similar to zlib
Both the behavior of the software as well as the properties of the file format have been designed to work similarly to those of the popular Unix compressing tools gzip and bzip2. It consists of a Unix port of Igor Pavlov's LZMA-SDK that has been adapted to fit seamlessly into Unix environments and their usual structure and behavior.
Just like gzip and bzip, xz and lzma can only compress single files (or data streams) as input. They cannot bundle multiple files into a single archive – to do this an archiving program is used first, such as tar.
Compressing an archive:
xz my_archive.tar # results in my_archive.tar.xz lzma my_archive.tar # results in my_archive.tar.lzma
Decompressing the archive:
unxz my_archive.tar.xz # results in my_archive.tar unlzma my_archive.tar.lzma # results in my_archive.tar
Version 1.22 or greater of the GNU implementation of tar has transparent support for tarballs compressed with lzma and xz, using the switches
-J for xz compression, and
--lzma for LZMA compression.
Creating an archive and compressing it:
tar -c --xz -f my_archive.tar.xz /some_directory # results in my_archive.tar.xz tar -c --lzma -f my_archive.tar.lzma /some_directory # results in my_archive.tar.lzma
Decompressing the archive and extracting its contents:
tar -x --xz -f my_archive.tar.xz # results in /some_directory tar -x --lzma -f my_archive.tar.lzma # results in /some_directory
Development and adoption
Development of XZ Utils took place within the Tukaani Project, which was led by Mike Kezner, by a small group of developers who once maintained a Linux distribution based on Slackware. Most of the source code for XZ Utils has been released into the public domain, with the rest being subject to different free software licenses. Specifically, most core parts are public domain software, while parts of the bulk system are under GNU LGPL v2.1 and parts of the build system under GNU GPL v2 and GNU GPL v3. The resulting software binary is therefore under the GPL.
Binaries are available for FreeBSD, Linux systems, Microsoft Windows, and FreeDOS. A number of Linux distributions, including Fedora, Slackware, Ubuntu, Debian, and Arch Linux, use xz for compressing their software packages. The GNU FTP archive also uses xz.
- "XZ Utils 5.2.4". [xz-devel]. Lasse Collin. 2018-04-29. Retrieved 2018-06-25.
- Licensing on tukaani.org "The most interesting parts of XZ Utils (e.g. liblzma) are in the public domain. You can do whatever you want with the public domain parts. Some parts of XZ Utils (e.g. build system and some utilities) are under different free software licenses such as GNU LGPLv2.1, GNU GPLv2, or GNU GPLv3."
- LZMA Utils, retrieved 2011-01-25
- Pierre Schmitz (2010-03-23). "News: Switching to xz compression for new packages".