XZ Utils

From Wikipedia, the free encyclopedia
Jump to: navigation, search
XZ Utils
Developer(s) The Tukaani Project
Stable release 5.0.3 / May 21, 2011; 9 months ago (2011-05-21)
Preview release 5.1.1 / April 12, 2011; 10 months ago (2011-04-12)
Written in C
Operating system Cross-platform
Type Data compression
License Bulk system under GNU LGPL v2.1 and public domain; Build system under GNU GPL v2, GNU GPL v3, and public domain; source code in public domain
Website tukaani.org/xz/

XZ Utils (previously LZMA Utils) is a set of free command-line lossless data compressors, including LZMA and xz, for Unix-like operating systems and (as of version 5.0) Microsoft Windows.

XZ Utils consists of three major components:

  • xz and lzma, the command-line compressor; analogous to gzip
  • xzdec and lzmadec, the command-line decompressor; analogous to zcat
  • liblzma, a software library with an API similar to zlib

XZ Utils can compress and decompress both the xz and lzma file formats, but since the LZMA format is now legacy[1], XZ Utils compresses by default to xz.

Contents

[edit] Implementation

Both the behavior of the software as well as the properties of the file format have been designed to work analogously 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 lzma- or xz-compressed tarballs, using the switches --xz or -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

[edit] Development and adoption

XZ Utils is being developed as part of The Tukaani Project (headed by Mike Kezner), a small group of developers who once had 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.

A number of Linux distributions, including Slackware and Arch linux[2], use xz for compressing their software packages. It is also used by the GNU FTP archive.

Binaries are available for GNU/Linux, Microsoft Windows, and FreeDOS.

[edit] See also

[edit] External links

[edit] References

Personal tools
Namespaces

Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages