XZ Utils

XZ Utils is free general-purpose data compression software with a high
compression ratio. XZ Utils were written for POSIX-like systems,
but also work on some not-so-POSIX systems.
XZ Utils are the successor to LZMA Utils.

The core of the XZ Utils compression code is based on
LZMA SDK, but it has been modified
quite a lot to be suitable for XZ Utils. The primary compression
algorithm is currently LZMA2, which is used inside the .xz container format.
With typical files, XZ Utils create 30 % smaller output than gzip and
15 % smaller output than bzip2.

XZ Utils consist of several components:

liblzma is a compression library with an API similar to that
of zlib.

xz is a command line tool with syntax similar to that
of gzip.

xzdec is a decompression-only tool smaller than
the full-featured xz tool.

A set of shell scripts (xzgrep, xzdiff, etc.) have been adapted
from gzip to ease viewing, grepping, and comparing compressed
files.

Emulation of command line tools of LZMA Utils eases transition
from LZMA Utils to XZ Utils.

While liblzma has a zlib-like API, liblzma doesn't include any file I/O
functions. A separate I/O library is planned, which would abstract handling
of .gz, .bz2, and .xz files with an easy to use API.

Source code

Stable

5.2.2 was released on 2015-09-29.

Cygwin users should note that XZ Utils 5.2.x can lose data
on Cygwin 1.7.34 or older. The bugs have been fixed in Cygwin 1.7.35
and thus XZ Utils 5.2.x works correctly on Cygwin 1.7.35 and later.
You can check your Cygwin version with cygcheck -V.
If you cannot upgrade to new enough Cygwin, you should stick to
XZ Utils 5.0.x which is fine and safe to use on older Cygwin versions.

Old stable

5.0.8 was released on 2014-12-21.

The 5.0.x branch is no longer maintained.
As of 2015-09-29 there are no known major bugs and
it is fine to keep using 5.0.8 for now if you don't want to upgrade to 5.2.x.
The API and ABI in 5.2.x are backward compatible with 5.0.x
so it should be straightforward to upgrade from 5.0.x to 5.2.x.

Perl

Haskell

Delphi and Free Pascal

Bindings and example programs for Delphi and Free Pascal are available
here.

Pre-built binaries

Many free software operating systems already provide easy-to-install
XZ Utils binaries.
It doesn't make sense to provide links to all those here.
Instead, binaries or links to websites providing binaries are listed here
only for operating systems that don't have well-known repositories where
users would get software like this.

If you have a website that provides up-to-date XZ Utils binaries for
an operating system that meets the the criteria above, let me know
and I will include a link here. Note that I won't host the binaries
themselves without a good reason.

Windows

The Windows version of XZ Utils includes binaries for 32-bit and 64-bit x86.
The binaries only depend on msvcrt.dll, which is available
on Windows 98 and later out of the box.

Mac OS X

DOS

The DOS version of XZ Utils includes only the xz command line tool
and some documentation.
The xz tool should work e.g. on FreeDOS (also in DOSEMU), MS-DOS,
and Windows 95/98/98SE/ME.
This doesn't necessarily work in DOSBox at all,
and at least some problems are expected under Windows XP Command Prompt
(signal handling doesn't work).

Since the DOS version is naturally going to get very little testing,
it is recommended to use the Windows version instead of the DOS version
if you need xz under Windows 98 or later.
It is likely that that the DOS version will be updated only occasionally.

5.2.0 and later have experimental support for 8.3 filenames.
See xz-dos.txt in the binary package or
dos/README.txt in the source package for details.

Juan Manuel Guerrero has made a more complete port of XZ Utils to DOS.
It also has support for short file names (8.3), but the naming
method is different from the one found in 5.2.0 and later.
It is available from
DJGPP mirrors
under /current/v2apps (e.g. xz-500b.zip for 5.0.0 binaries).

Old versions

Supported platforms

Below is an incomplete and somewhat vague (version numbers mostly missing)
list of operating systems on which XZ Utils should work.
The compiler(s) or toolchains are mentioned in parenthesis.
GCC refers to GCC 3 or later.
If you have additions or corrections, please email them to me.