XZ Utils
Encyclopedia
XZ Utils is a set of free
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 command-line
Command-line interface
A command-line interface is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks...

 lossless data compressors
Lossless data compression
Lossless data compression is a class of data compression algorithms that allows the exact original data to be reconstructed from the compressed data. The term lossless is in contrast to lossy data compression, which only allows an approximation of the original data to be reconstructed, in exchange...

, including LZMA and xz
Xz
xz is a lossless data compression file format incorporating the LZMA2 compression algorithm. 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...

, for Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 operating systems and (as of version 5.0) Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

.

XZ Utils consists of three major components:
  • xz and lzma, the command-line compressor; analogous to gzip
    Gzip
    Gzip is any of several software applications used for file compression and decompression. The term usually refers to the GNU Project's implementation, "gzip" standing for GNU zip. It is based on the DEFLATE algorithm, which is a combination of Lempel-Ziv and Huffman coding...

  • xzdec and lzmadec, the command-line decompressor; analogous to zcat
  • liblzma, a software library with an API
    Application programming interface
    An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

     similar to zlib
    Zlib
    zlib is a software library used for data compression. zlib was written by Jean-Loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. Zlib is also a crucial component of many software platforms including Linux, Mac OS X,...



XZ Utils can compress and decompress both the xz and lzma file formats, but since the LZMA format is now legacy
Legacy system
A legacy system is an old method, technology, computer system, or application program that continues to be used, typically because it still functions for the users' needs, even though newer technology or more efficient methods of performing a task are now available...

, XZ Utils compresses by default to xz.

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
Gzip
Gzip is any of several software applications used for file compression and decompression. The term usually refers to the GNU Project's implementation, "gzip" standing for GNU zip. It is based on the DEFLATE algorithm, which is a combination of Lempel-Ziv and Huffman coding...

 and bzip2
Bzip2
bzip2 is a free and open source implementation of the Burrows–Wheeler algorithm. It is developed and maintained by Julian Seward. Seward made the first public release of bzip2, version 0.15, in July 1996.-Compression efficiency:...

. It consists of a Unix port of Igor Pavlov
Igor Pavlov (programmer)
Igor Pavlov is a Russian freelance programmer and is the creator and the maintainer of the file archiver 7-Zip and its toolset. He is also the creator of the 7z archive format...

's LZMA-SDK
Software development kit
A software development kit is typically a set of software development tools that allows for the creation of applications for a certain software package, software framework, hardware platform, computer system, video game console, operating system, or similar platform.It may be something as simple...

 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
File archiver
A file archiver is a computer program that combines a number of files together into one archive file, or a series of archive files, for easier transportation or storage...

; to do this an archiving program is used first, such as tar
Tar (file format)
In computing, tar is both a file format and the name of a program used to handle such files...

.

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
GNU
GNU is a Unix-like computer operating system developed by the GNU project, ultimately aiming to be a "complete Unix-compatible software system"...

 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

Development and adoption

XZ Utils is being developed as part of The Tukaani Project, a small group of developers who once had maintained a Linux distribution
Linux distribution
A Linux distribution is a member of the family of Unix-like operating systems built on top of the Linux kernel. Such distributions are operating systems including a large collection of software applications such as word processors, spreadsheets, media players, and database applications...

 based on Slackware
Slackware
Slackware is a free and open source Linux-based operating system. It was one of the earliest operating systems to be built on top of the Linux kernel and is the oldest currently being maintained. Slackware was created by Patrick Volkerding of Slackware Linux, Inc. in 1993...

. Most of the source code for XZ Utils has been released into the public domain
Public domain
Works are in the public domain if the intellectual property rights have expired, if the intellectual property rights are forfeited, or if they are not covered by intellectual property rights at all...

 with the rest being subject to different free software licenses.

A number of Linux distributions, including Slackware and Arch linux
Arch Linux
Arch Linux is an independently developed, Linux-based operating system for i686 and x86-64 computers. It is composed predominantly of free and open source software, and supports community involvement....

, use xz for compressing their software packages. It is also used by the GNU
GNU
GNU is a Unix-like computer operating system developed by the GNU project, ultimately aiming to be a "complete Unix-compatible software system"...

FTP archive.

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

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK