8 This package includes command line tools (xz.exe and a few others)
9 and the liblzma compression library from XZ Utils. You can find the
10 latest version and full source code from <https://tukaani.org/xz/>.
12 The parts of the XZ Utils source code, that are relevant to this
13 binary package, are in the public domain. XZ Utils have been built
14 for this package with MinGW-w64 and linked statically against its
15 runtime libraries. See COPYING-Windows.txt for the copyright and
16 license information that applies to the MinGW-w64 runtime. You must
17 include it when redistributing these XZ Utils binaries.
23 All executables and libraries in this package require msvcrt.dll.
24 It's included in all recent Windows versions. (On Windows 95 it
25 might be missing, but once you get it somewhere, the i686 binaries
26 should run even on Windows 95 if the processor is new enough.)
28 There is a SSE2 optimization in the compression code but this
29 version of XZ Utils doesn't include run-time processor detection.
30 This is why there is a separate i686-SSE2 version.
32 There is one directory for each type of executable and library files:
34 bin_i686 32-bit x86 (i686 and newer), Windows 95 and later
35 bin_i686-sse2 32-bit x86 (i686 with SSE2), Windows 98 and later
36 bin_x86-64 64-bit x86-64, Windows Vista and later
38 Each of the above directories have the following files:
40 *.exe Command line tools. (It's useless to double-click
41 these; use the command prompt instead.) These have
42 been linked statically against liblzma, so they
43 don't require liblzma.dll. Thus, you can copy e.g.
44 xz.exe to a directory that is in PATH without copying
45 any other files from this package.
47 liblzma.dll Shared version of the liblzma compression library.
48 This file is mostly useful to developers, although
49 some non-developers might use it to upgrade their
52 liblzma.a Static version of the liblzma compression library.
53 This file is useful only for developers.
55 The rest of the directories contain architecture-independent files:
57 doc Documentation in the plain text (TXT) format. The
58 manuals of the command line tools are provided also
59 in the PDF format. liblzma.def is in this directory
62 include C header files for liblzma. These should be
63 compatible with most C and C++ compilers. If you
64 have problems, try to fix it and send your fixes
65 upstream, or at least report a bug, thanks.
68 Linking against liblzma
69 -----------------------
73 If you use MinGW, linking against liblzma.dll or liblzma.a should
74 be straightforward. You don't need an import library to link
75 against liblzma.dll, and for static linking, you don't need to
76 worry about the LZMA_API_STATIC macro.
78 Note that the MinGW distribution includes liblzma. If you are
79 building packages that will be part of the MinGW distribution, you
80 probably should use the version of liblzma shipped in MinGW instead
86 To link against liblzma.dll, you need to create an import library
87 first. You need the "lib" command from MSVC and liblzma.def from
88 the "doc" directory of this package. Here is the command that works
91 lib /def:liblzma.def /out:liblzma.lib /machine:ix86
93 On x86-64, the /machine argument has to naturally be changed:
95 lib /def:liblzma.def /out:liblzma.lib /machine:x64
97 If you need to link statically against liblzma, you should build
98 liblzma with MSVC 2013 update 2 or later. Alternatively, if having
99 a decompressor is enough, consider using XZ Embedded or LZMA SDK.
101 When you plan to link against static liblzma, you need to tell
102 lzma.h to not use __declspec(dllimport) by defining the macro
103 LZMA_API_STATIC. You can do it either in the C/C++ code
105 #define LZMA_API_STATIC
108 or by adding it to compiler options.
113 If you are using some other compiler, see its documentation how to
114 create an import library (if it is needed). If it is simple, I
115 might consider including the instructions here.
121 Report bugs to <xz@tukaani.org>.