This package provides a data compression library and utilities
supporting the .xz and .lzma file formats, which use the LZMA
compression algorithm. LZMA provides high compression ratios
and very fast decompression, with minimal memory requirements
for decompression. XZ Utils is the latest generation of this
software, supplanting the older LZMA Utils.
XZ Utils provides the xz tool, which supports the new .xz
file format usually indicated by the extension '.xz'. Internally,
it uses a variation of the original LZMA compression algorithm,
called LZMA2. However, the new xz tool also seamlessly supports
the older .lzma files and LZMA1 compression.
Files: xz-5.0.3-2-mingw32-src.tar.lzma (full source code)
xz-5.0.3-2-mingw32-bin.tar.lzma (utilities, scripts)
xz-5.0.3-2-mingw32-doc.tar.lzma (FAQ, readmes, manpages)
xz-5.0.3-2-mingw32-lang.tar.lzma (i18n support)
xz-5.0.3-2-mingw32-lic.tar.lzma (licensing terms)
liblzma-5.0.3-2-mingw32-dev.tar.lzma (libraries and headers)
liblzma-5.0.3-2-mingw32-dll-5.tar.lzma (redistributable DLL)
This distribution incorporates pre-built binary components, which
have been specifically compiled for the "mingw32" subsystem; in
other words, they comprise binary executables and object libraries
suitable for native use on Microsoft's 32-bit Windows operating
system. As such, the xz packages should be installed into the
/mingw directory (which is usually, but not always, C:\MinGW).
For the most part, the binaries and object libraries provided by the
xz packages have runtime dependencies detailed below, which generally
represent other libraries provided by the MinGW team. (Standard
components of the operating system are not listed). However, there
are a few exceptions to this general rule:
These utilities are provided in the form of Bourne shell scripts, and
thus require a Bourne shell to execute. The MinGW Project recommends the
use of their own MSYS shell system, but other products may suffice -- YMMV.
These scripts CANNOT be invoked directly from Microsoft's cmd.exe. In
addition, these scripts may also rely on the presence of other unix-derived
utilities. These additional requirements are outlined below, but are usually
available in a standard unix or MSYS installation.
The preceding exception does NOT apply, in the case of:
lzmainfo.exe (there is no xzinfo)
Each of the above IS suitable for use, directly from cmd.exe (provided the
runtime requirements are present). Also, the shared and static library
may be used by client programs that are themselves suitable for use from
cmd.exe; nothing in the libraries prohibits such operation.
Additional runtime requirements for helper scripts
liblzma: public domain
xz, xzdec, lzmadec: public domain (LGPLv2.1+ under certain circumstances)
lzdiff, other scripts: GPLv2+
build system: varies: public domain, GPLv2+, GPLv3+
mgwport xz-5.0.3-1.mgwport all
This will create:
See `mgwport --help' for other options.
1. LZMA SDK
First there was the LZMA SDK. Upstream, it shipped no libraries;
only a few executables such as 'lzma'. The source code was
provided for public use (under a variety of licenses), but it
was expected that developers would incorporate the source code
directly into their own projects. This is not The Unix Way.
The LZMA SDK was tightly coupled with the 7zip compression
program, and both were developed on and solely for the Windows
platform. 7zip -- but not the LZMA SDK -- was ported to
Unix under the auspices of the p7zip ("Portable 7zip") project.
(As an aside, p7zip was then ported to cygwin...to come full
circle). However, it should be clear that the file format used
by 7zip (and p7zip) was completely different from the one
supported by the LZMA SDK's 'lzma' tool. The latter used what
was called the 'LZMA-Alone' format, which consisted of 13 bytes
of header information followed by a raw lzma-compressed byte-
stream. 7zip, on the other hand, used a much more complicated
file format capable of hosting multiple files, spanned archives,
and other features. The only similarity is that the core data
compression algorithm used by both is LZMA.
2. LZMA Utils
Eventually, a unix port of the LZMA SDK appeared, in the form of
the LZMA Utils distribution, which reorganized the original
source code, and provided the decompression code in library form
(liblzmadec). It also provided a version of the 'lzma' program,
but with a completely different command-line interface. The
LZMA Utils version consciously mimicked the command-line options
of the familiar gzip and bzip2 tools, while the original LZMA
SDK version was...different. Very different. This is because the
LZMA SDK's tool was originally intended just as a test and
development utility, to help refine the algorithm. So, it has a
number of 'compression guru' options that no sane user cares to
use, and very few of the 'normal user' options that they would.
LZMA Utils: (Lasse Collin)
lzma -d foo.tar.lzma
uncompress to (implied) foo.tar, and remove
original compressed file.
compress to (implied) foo.tar.lzma, and remove
original uncompressed file.
Supports familiar "tuning" options like -0 .. -9
Sends output data to stdout using -c
Could be invoked under alternate names (symlinks)
for different behavior:
unlzma == lzma -d (uncompress)
lzcat == lzma -dc (uncompress to stdout)
LZMA SDK: (Igor Pavlov)
lzma d foo.tar.lzma foo.tar
lzma e foo.tar foo.tar.lzma
mode d/e is the required first non-option argument
both input and output files must be specified
stdout? what's that?
Finally, LZMA Utils also shipped a number of helpful
scripts similar to the familiar ones from gzip and bzip2:
lzdiff/lzcmp, lzgrep/lzegrep/lzfgrep, lzless/lzmore
So, the LZMA SDK version was hardly suitable for replacing
or augmenting the existing bzip2 and gzip compression programs
on unix systems, expecially as the most common use was in
conjuction with tar. But tar expects compression programs
to satisfy a common command-line argument format, and to be
able to manipulate data on standard streams. Most linux
distributions have standardized on LZMA Utils.
However, the .lzma file format (e.g. LZMA-Alone) is not
sufficient for modern needs, as it (1) had no 'signature
bytes' so compressed files were difficult to automatically
detect and verify, (2) it had no provision for internal
integrity checks, and (3) it could not support multi-file
3. XZ Utils
Approaching final non-beta release is the newest member of
this family, the XZ Utils. Addressing the shortcomings of the
LZMA-Alone file format, the xz file format and the (slightly
modified) LZMA2 compression algorithm were jointly developed
by Lasse Collin (LZMA Utils) and Igor Pavlov (LZMA SDK). The
xz tool has all of the benefits of the LZMA Utils' version of
the lzma tool, and ships with all of the same helpful scripts.
In addition, it can be invoked as either 'xz' (or xzcat, unxz)
or 'lzma' (or lzcat, unlzma) so you don't even need to retrain
You probably should, though, because .lzma files are already
being replaced by .xz files on by many software distribution
sites, including GNU ones.
Finally, the XZ Utils also provides the liblzma decompression
AND compression library, which supports both LZMA-Alone (that
is, the old .lzma) format, and the new .xz format.
The new .xz file format has an easily identifiable initial
signature for automated format detection and verification. It
supports integrity checks of several types including crypto-
graphic hashes. Finally, the format also supports multiple
compressed streams within the same file (that is, multi-file
archives). However, the xz tool does NOT, at present, support
multi-file archives; only archives with a single compressed
As an aside, eventually the 7zip (and p7zip) utilities will
support a "new" .7z format -- which will be simply a compatible
variant of the .xz file format, but with custom filters (codecs)
specified in the (highly extensible) header defined by the .xz
standard. This was the primary reason for the new .xz format
to support multi-file archives; because the xz tool has no
present need for them, and doesn't even support them (although
the liblzma library does).
Single File Compression
Although the xz file format supports multiple streams, the
xz tool itself is concerned only with single files that have
been compressed as a single complete stream using LZMA compression.
This is similar to the behavior of the older lzma tool and its
LZMA-Alone file format, or the archetypal gzip and bzip2
Just as with bzip2 and gzip (and the old lzma tool), to create
multi-file archives you should use tar and THEN compress with
xz.exe. For an integrated compressed archive file format that
uses LZMA compression, see p7zip and the 7zip programs, and
their associated .7z file format.
Test suite results
This section of this document is updated with each new release.
No history is maintained here.
All 7 tests passed
---------- xz-5.0.3-2 -- 2011 Sep 19 -----------
* Rebuild with gcc-4.6.1
---------- xz-5.0.3-1 -- 2011 Sep 02 ----------- unreleased ----------
* Update to latest upstream release, non-beta!
+ Bumps DLL number to "5"
* Adapt build system to use mgwport framework
---------- xz-4.999.9beta_20100401-1 -- 2010 Apr 09 -----------
* Update to 2010-Apr-01 git snapshot
Wed Mar 31 16:47:25 2010 +0300
---------- xz-4.999.9beta_20091209-3 -- 2009 Dec 21 -----------
* Update to latest upstream git snapshot
* Various upstream fixes
* No longer require am-1.11; other packaging changes to ease cross
---------- xz-4.999.9beta-1 -- 2009 Aug 30 -----------
* Update to latest upstream release
* Use (new) upstream xz.1 in preference to custom attempt
at a man page.
- Lots of documentation updates
- Fixes data corruption error
- C++ compatiblity fixes
- New lzmainfo utility
- Fixes to helper scripts (xzdiff, xzless, etc)
- Other miscellaneous bug fixes and build improvements
- Distribute a changelog derived from git log.
---------- xz-4.999.8beta_20090725git-1 -- 2009 Jul 25 -----------
* First release of either xz OR lzma for mingw by
the MinGW team. Based on a git snapshot because Lasse Collin
says: "snapshot of the code in the git repository is better than
the latest beta release", which is certainly true for mingw, as
only recently have a number of win32 fixes and improvements been
implemented. Snapshot is git master at 2009-07-24T13:15:06+0300
* Includes patches to support automake1.11 and "silent rules".
* Fix installation issue with missing .exe extensions.
* Bump the DLL number to "1" (for consistency with cygwin). No worries:
when xz-5.0.0 the DLL number (and unix SONAME) will be artificially
incremented to "5").