5 5.7.1alpha (2025-01-23)
7 * All fixes from 5.6.4.
11 - Improve LZMA/LZMA2 encoder speed on 64-bit PowerPC (both
12 endiannesses) and those 64-bit RISC-V processors that
13 support fast unaligned access.
15 - x86/x86-64/E2K CLMUL CRC code was rewritten. It's faster and
16 doesn't cause false positives from sanitizers. Attributes
17 like __attribute__((__no_sanitize_address__)) are no longer
20 - On 32-bit x86, CLMUL CRC and the old (but still good)
21 assembly versions now co-exist with runtime detection.
22 Both Autotools and CMake build systems handle this
25 - Use the CRC32 instructions on LoongArch to make CRC32
28 - Add low-level APIs for RISC-V, ARM64, and x86 BCJ filters
29 to lzma/bcj.h. These are primarily for erofs-utils.
31 - Minor tweaks to ARM64 CRC32 code and BCJ filters were made.
35 - Synchronize the output file and its directory before deleting
36 the input file using fsync(). This reduces the probability of
37 data loss after a system crash. However, it can be a major
38 performance hit if processing many small files.
40 NOTE: No syncing is done when xz isn't going to delete
43 - Add a new option --no-sync to disable the sync-before-delete
44 behavior. It's useful when compressing many small files and
45 one doesn't worry about data loss in case of a system crash.
47 - Make --single-stream imply --keep.
49 - Use automatic word wrapping for the text in --help and
50 similar situations to hopefully make the strings easier for
51 majority of translators (no need to count spaces anymore).
53 * xz, xzdec, lzmainfo: When printing messages, replace
54 non-printable characters with question marks. This way
55 malicious filenames cannot be used to send escape sequences
56 to a terminal. This change is also applied to filenames shown
57 in "xz --robot --list".
59 * xz and xzdec on Linux: Add support for Landlock ABI versions 5
64 - Increase the minimum required CMake version to 3.20.
66 - Revise the configuration variables and some of their options.
67 Document them in the file INSTALL.
69 - Attempt to produce liblzma.pc so that the paths are based on
70 ${prefix}, which makes it simpler to override the paths
71 if the liblzma files have been moved.
73 - To enable translations, gettext-tools is now required. The
74 CMake build no longer supports installing pre-compiled
75 message catalog binary files (po/*.gmo).
77 - Apple: Use Mach-O shared library versioning that is
78 compatible with GNU Libtool. This should make it easier to
79 switch between the build systems on Apple OSes that enforce
80 the correct compatibility_version (macOS >= 12 doesn't?).
81 This change is backward compatible: binaries linked against
82 old CMake-built liblzma will run with liblzma that uses
83 Libtool style versioning.
85 - Windows (not Cygwin): Document CMAKE_DLL_NAME_WITH_SOVERSION
86 (CMake >= 3.27) in the file INSTALL. This option should
87 usually be left to its default value (OFF). It can be set
88 to ON if the liblzma DLL filename must be compatible with
89 the versioned filename produced by GNU Libtool. For example,
90 binaries distributed in MSYS2 use a versioned DLL filename.
92 - CMake support is no longer experimental. (It was already
93 not experimental when building for native Windows.)
95 * Windows: Building liblzma with Visual Studio 2013 is no longer
96 supported. Visual Studio 2015 or later (with CMake) can be used
97 to build liblzma and the command line tools.
99 * Add preliminary Georgian translation. This already contains
100 translations of most of the strings that are now automatically
103 * Add build-aux/license-check.sh. Without arguments, it checks that
104 no license information has been forgotten. With the -v argument,
105 it shows the license info (or the lack of it) for each file.
107 If the .git directory is available, only the files in the
108 repository are checked. Without the .git directory, a clean tree
109 from an extracted release tarball is expected.
114 * liblzma: Fix LZMA/LZMA2 encoder on big endian ARM64.
118 - Fix --filters= and --filters1= ... --filters9= options
119 parsing. They require an argument, thus "xz --filters lzma2"
120 should work in addition to "xz --filters=lzma2".
122 - On the man page, note in the --compress and --decompress
123 options that the default behavior is to delete the input
124 file unless writing to standard output. It was already
125 documented in the DESCRIPTION section but new users in
126 a hurry might miss it.
128 * Windows (native builds, not Cygwin): Fix regressions introduced
129 in XZ Utils 5.6.3 which caused non-ASCII characters to display
130 incorrectly. Only builds with translation support were affected
131 (--enable-nls or ENABLE_NLS=ON). The following changes affect
132 builds that have translations enabled:
134 - Require UCRT because MSVCRT doesn't support UTF-8
135 locales and thus translations won't be readable on
136 Windows 10 version 1903 and later. (MSVCRT builds
137 are still possible with --disable-nls or ENABLE_NLS=OFF.)
139 - Require gettext-runtime >= 0.23.1 because older versions
140 don't autodetect the use of the UTF-8 code page. This
141 resulted in garbled non-ASCII characters even with UCRT.
143 - Partially fix alignment issues in xz --verbose --list
144 with translated messages. Chinese (simplified),
145 Chinese (traditional), and Korean column headings
146 are misaligned still because Windows and MinGW-w64
147 don't provide wcwidth() and XZ Utils doesn't include
148 a replacement function either.
150 * CMake: Explicitly disable unity builds. This prevents build
151 failures when another project uses XZ Utils via CMake's
152 FetchContent module, and that project enables unity builds.
154 * Update Chinese (traditional) and Serbian translations.
159 IMPORTANT: This includes a Windows-specific security fix to
160 the command line tools (CVE-2024-47611). liblzma isn't affected
165 - Fix x86-64 inline assembly compatibility with GNU Binutils
168 - Fix the build with GCC 4.2 on OpenBSD/sparc64.
170 * xzdec: Display an error instead of failing silently if the
171 unsupported option -M is specified.
173 * lzmainfo: Fix integer overflows when rounding the dictionary and
174 uncompressed sizes to the nearest mebibyte.
176 * Windows (except Cygwin and MSYS2): Add an application manifest to
177 xz, xzdec, lzmadec, and lzmainfo executables:
179 - Declare them compatible with Vista/7/8/8.1/10/11. This way
180 the programs won't needlessly use Operating System Context
181 of Vista when running on later Windows versions. This setting
182 doesn't mean that the executables cannot run on even older
183 versions if otherwise built that way.
185 - Declare them as UAC-compliant. MSVC added this by default
186 already but it wasn't done with MinGW-w64, at least not
187 with all toolchain variants.
189 - Declare them long path aware. This makes long path names
190 work on Windows 10 and 11 if the feature has been enabled
191 in the Windows registry.
193 - Use the UTF-8 code page on Windows 10 version 1903 and later.
195 * Now command line tools can access files whose names
196 contain characters that don't exist in the current
199 * The options --files and --files0 now expect file lists
200 to be in UTF-8 instead of the legacy code page.
202 * This fixes a security issue: If a command line contains
203 Unicode characters (for example, filenames) that don't
204 exist in the current legacy code page, the characters are
205 converted to similar-looking characters with best-fit
206 mapping. Some best-fit mappings result in ASCII
207 characters that change the meaning of the command line,
208 which can be exploited with malicious filenames to do
209 argument injection or directory traversal attacks.
210 UTF-8 avoids best-fit mappings and thus fixes the issue.
213 Forcing the process code page to UTF-8 is possible only
214 on Windows 10 version 1903 and later. The command line
215 tools remain vulnerable if used on an old older
218 This issue was discovered by Orange Tsai and splitline
219 from DEVCORE Research Team.
221 A related smaller issue remains: Windows filenames may
222 contain unpaired surrogates (invalid UTF-16). These are
223 converted to the replacement character U+FFFD in the
224 UTF-8 code page. Thus, filenames with different unpaired
225 surrogates appear identical and aren't distinguishable
226 from filenames that contain the actual replacement
229 * When building with MinGW-w64, it is recommended to use
230 UCRT version instead of the old MSVCRT. For example,
231 non-ASCII characters from filenames won't print
232 correctly in messages to console with MSVCRT with
233 the UTF-8 code page (a cosmetic issue). liblzma-only
234 builds are still fine with MSVCRT.
236 - Cygwin and MSYS2 process command line options differently and
237 the above issues don't exist. There is no need to replace the
238 default application manifest on Cygwin and MSYS2.
240 * Autotools-based build:
242 - Fix feature checks with link-time optimization (-flto).
244 - Solaris: Fix a compatibility issue in version.sh. It matters
245 if one wants to regenerate configure by running autoconf.
249 - Use paths relative to ${prefix} in liblzma.pc when possible.
250 This is done only with CMake >= 3.20.
252 - MSVC: Install liblzma.pc as it can be useful with MSVC too.
254 - Windows: Fix liblzma filename prefix, for example:
256 * Cygwin: The DLL was incorrectly named liblzma-5.dll.
257 Now it is cyglzma-5.dll.
259 * MSVC: Rename import library from liblzma.lib to lzma.lib
260 while keeping liblzma.dll name as is. This helps with
261 "pkgconf --msvc-syntax --libs liblzma" because it mungles
262 "-llzma" in liblzma.pc to "lzma.lib".
264 * MinGW-w64: No changes.
266 - Windows: Use the correct resource file for lzmadec.exe.
267 Previously the resource file for xzdec.exe was used for both.
268 Autotools-based build isn't affected.
270 - Prefer a C11 compiler over a C99 compiler but accept both.
272 - Link Threads::Threads against liblzma using PRIVATE so that
273 -pthread and such flags won't unnecessarily get included in
274 the usage requirements of shared liblzma. That is,
275 target_link_libraries(foo PRIVATE liblzma::liblzma) no
276 longer adds -pthread if using POSIX threads and linking
277 against shared liblzma. The threading flags are still added
278 if linking against static liblzma.
280 * Updated translations: Catalan, Chinese (simplified), and
281 Brazilian Portuguese.
286 * Remove the backdoor (CVE-2024-3094).
288 * Not changed: Memory sanitizer (MSAN) has a false positive
289 in the CRC CLMUL code which also makes OSS Fuzz unhappy.
290 Valgrind is smarter and doesn't complain.
292 A revision to the CLMUL code is coming anyway and this issue
293 will be cleaned up as part of it. It won't be backported to
294 5.6.x or 5.4.x because the old code isn't wrong. There is
295 no reason to risk introducing regressions in old branches
296 just to silence a false positive.
300 - lzma_index_decoder() and lzma_index_buffer_decode(): Fix
301 a missing output pointer initialization (*i = NULL) if the
302 functions are called with invalid arguments. The API docs
303 say that such an initialization is always done. In practice
304 this matters very little because the problem can only occur
305 if the calling application has a bug and these functions
306 return LZMA_PROG_ERROR.
308 - lzma_str_to_filters(): Fix a missing output pointer
309 initialization (*error_pos = 0). This is very similar
312 - Fix C standard conformance with function pointer types.
314 - Remove GNU indirect function (IFUNC) support. This is *NOT*
315 done for security reasons even though the backdoor relied on
316 this code. The performance benefits of IFUNC are too tiny in
317 this project to make the extra complexity worth it.
319 - FreeBSD on ARM64: Add error checking to CRC32 instruction
322 - Fix building with NVIDIA HPC SDK.
326 - Fix a C standard conformance issue in --block-list parsing
327 (arithmetic on a null pointer).
329 - Fix a warning from GNU groff when processing the man page:
330 "warning: cannot select font 'CW'"
332 * xzdec: Add support for Linux Landlock ABI version 4. xz already
333 had the v3-to-v4 change but it had been forgotten from xzdec.
335 * Autotools-based build system (configure):
337 - Symbol versioning variant can now be overridden with
338 --enable-symbol-versions. Documentation in INSTALL was
341 - Add new configure option --enable-doxygen to enable
342 generation and installation of the liblzma API documentation
343 using Doxygen. Documentation in INSTALL and PACKAGERS was
348 - Fix detection of Linux Landlock support. The detection code
349 in CMakeLists.txt had been sabotaged.
351 - Disable symbol versioning on non-glibc Linux to match what
352 the Autotools build does. For example, symbol versioning
353 isn't enabled with musl.
355 - Symbol versioning variant can now be overridden by setting
356 SYMBOL_VERSIONING to "OFF", "generic", or "linux".
358 - Add support for all tests in typical build configurations.
359 Now the only difference to the tests coverage to Autotools
360 is that CMake-based build will skip more tests if features
361 are disabled. Such builds are only for special cases like
364 - Separate the CMake code for the tests into tests/tests.cmake.
365 It is used conditionally, thus it is possible to
369 and the CMake-based build will still work normally except
370 that no tests are then available.
372 - Add a option ENABLE_DOXYGEN to enable generation and
373 installation of the liblzma API documentation using Doxygen.
377 - Omit the Doxygen-generated liblzma API documentation from the
378 package. Instead, the generation and installation of the API
379 docs can be enabled with a configure or CMake option if
380 Doxygen is available.
382 - Remove the XZ logo which was used in the API documentation.
383 The logo has been retired and isn't used by the project
384 anymore. However, it's OK to use it in contexts that refer
385 to the backdoor incident.
387 - Remove the PDF versions of the man pages from the source
388 package. These existed primarily for users of operating
389 systems which don't come with tools to render man page
390 source files. The plain text versions are still included
391 in doc/man/txt. PDF files can still be generated to doc/man,
392 if the required tools are available, using "make pdf" after
395 - Update home page URLs back to their old locations on
398 - Update maintainer info.
402 - In tests/files/README, explain how to recreate the ARM64
405 - Remove two tests that used tiny x86 and SPARC object files
406 as the input files. The matching .c file was included but
407 the object files aren't easy to reproduce. The test cases
408 weren't great anyway; they were from the early days (2009)
409 of the project when the test suite had very few tests.
411 - Improve a few tests.
416 IMPORTANT: This fixed bugs in the backdoor (CVE-2024-3094) (someone
417 had forgot to run Valgrind).
419 * liblzma: Fixed two bugs relating to GNU indirect function (IFUNC)
420 with GCC. The more serious bug caused a program linked with
421 liblzma to crash on start up if the flag -fprofile-generate was
422 used to build liblzma. The second bug caused liblzma to falsely
423 report an invalid write to Valgrind when loading liblzma.
425 * xz: Changed the messages for thread reduction due to memory
426 constraints to only appear under the highest verbosity level.
430 - Fixed a build issue when the header file <linux/landlock.h>
431 was present on the system but the Landlock system calls were
432 not defined in <sys/syscall.h>.
434 - The CMake build now warns and disables NLS if both gettext
435 tools and pre-created .gmo files are missing. Previously,
436 this caused the CMake build to fail.
438 * Minor improvements to man pages.
440 * Minor improvements to tests.
445 IMPORTANT: This added a backdoor (CVE-2024-3094). It's enabled only
446 in the release tarballs.
448 This bumps the minor version of liblzma because new features were
449 added. The API and ABI are still backward compatible with liblzma
450 5.4.x and 5.2.x and 5.0.x.
452 NOTE: As described in the NEWS for 5.5.2beta, the core components
453 are now under the BSD Zero Clause License (0BSD).
459 - Disabled the branchless C variant in the LZMA decoder based
460 on the benchmark results from the community.
462 - Disabled x86-64 inline assembly on x32 to fix the build.
464 * Sandboxing support in xz:
466 - Landlock is now used even when xz needs to create files.
467 In this case the sandbox has to be more permissive than
468 when no files need to be created. A similar thing was
469 already in use with pledge(2) since 5.3.4alpha.
471 - Landlock and pledge(2) are now stricter when reading from
472 more than one input file and only writing to standard output.
474 - Added support for Landlock ABI version 4.
478 - Default to -O2 instead of -O3 with CMAKE_BUILD_TYPE=Release.
479 -O3 is not useful for speed and makes the code larger.
481 - Now builds lzmainfo and lzmadec.
483 - xzdiff, xzgrep, xzless, xzmore, and their symlinks are now
484 installed. The scripts are also tested during "make test".
486 - Added translation support for xz, lzmainfo, and the
489 - Applied the symbol versioning workaround for MicroBlaze that
490 is used in the Autotools build.
492 - The general XZ Utils and liblzma API documentation is now
495 - The CMake component names were changed a little and several
496 were added. liblzma_Runtime and liblzma_Development are
499 - Minimum required CMake version is now 3.14. However,
500 translation support is disabled with CMake versions
503 - The CMake-based build is now close to feature parity with the
504 Autotools-based build. Most importantly a few tests aren't
505 run yet. Testing the CMake-based build on different operating
506 systems would be welcome now. See the comment at the top of
509 * Fixed a bug in the Autotools feature test for ARM64 CRC32
510 instruction support for old versions of Clang. This did not
511 affect the CMake build.
515 - The build instructions in INSTALL and windows/INSTALL*.txt
516 were revised completely.
518 - windows/build-with-cmake.bat along with the instructions
519 in windows/INSTALL-MinGW-w64_with_CMake.txt should make
520 it very easy to build liblzma.dll and xz.exe on Windows
521 using CMake and MinGW-w64 with either GCC or Clang/LLVM.
523 - windows/build.bash was updated. It now works on MSYS2 and
524 on GNU/Linux (cross-compiling) to create a .zip and .7z
525 package for 32-bit and 64-bit x86 using GCC + MinGW-w64.
527 * The TODO file is no longer installed as part of the
528 documentation. The file is out of date and does not reflect
529 the actual tasks that will be completed in the future.
533 - Translated lzmainfo man pages are now installed. These
534 had been forgotten in earlier versions.
536 - Updated Croatian, Esperanto, German, Hungarian, Korean,
537 Polish, Romanian, Spanish, Swedish, Vietnamese, and Ukrainian
540 - Updated German, Korean, Romanian, and Ukrainian man page
545 Summary of new features added in the 5.5.x development releases:
549 - LZMA decoder: Speed optimizations to the C code and
550 added GCC & Clang compatible inline assembly for x86-64.
552 - Added lzma_mt_block_size() to recommend a Block size for
553 multithreaded encoding.
555 - Added CLMUL-based CRC32 on x86-64 and E2K with runtime
556 processor detection. Similar to CRC64, on 32-bit x86 it
557 isn't available unless --disable-assembler is used.
559 - Optimized the CRC32 calculation on ARM64 platforms using the
560 CRC32 instructions. Runtime detection for the instruction is
561 used on GNU/Linux, FreeBSD, Windows, and macOS. If the
562 compiler flags indicate unconditional CRC32 instruction
563 support (+crc) then the generic version is not built.
565 - Added definitions of mask values like
566 LZMA_INDEX_CHECK_MASK_CRC32 to <lzma/index.h>.
570 - Multithreaded mode is now the default. This improves
571 compression speed and creates .xz files that can be
572 decompressed in multithreaded mode. The downsides are
573 increased memory usage and slightly worse compression ratio.
575 - Added a new command line option --filters to set the filter
576 chain using the liblzma filter string syntax.
578 - Added new command line options --filters1 ... --filters9 to
579 set additional filter chains using the liblzma filter string
580 syntax. The --block-list option now allows specifying filter
581 chains that were set using these new options.
583 - Ported the command line tools to Windows MSVC.
584 Visual Studio 2015 or later is required.
586 * Added lz4 support to xzdiff/xzcmp and xzgrep.
589 5.5.2beta (2024-02-14)
591 * Licensing change: The core components are now under the
592 BSD Zero Clause License (0BSD). In XZ Utils 5.4.6 and older
593 and 5.5.1alpha these components are in the public domain and
594 obviously remain so; the change affects the new releases only.
596 0BSD is an extremely permissive license which doesn't require
597 retaining or reproducing copyright or license notices when
598 distributing the code, thus in practice there is extremely
599 little difference to public domain.
603 - Significant speed optimizations to the LZMA decoder were
604 made. There are now three variants that can be chosen at
607 * Basic C version: This is a few percent faster than
608 5.4.x due to some new optimizations.
610 * Branchless C: This is currently the default on platforms
611 for which there is no assembly code. This should be a few
612 percent faster than the basic C version.
614 * x86-64 inline assembly. This works with GCC and Clang.
616 The default choice can currently be overridden by setting
617 LZMA_RANGE_DECODER_CONFIG in CPPFLAGS: 0 means the basic
618 version and 3 means that branchless C version.
620 - Optimized the CRC32 calculation on ARM64 platforms using the
621 CRC32 instructions. The instructions are optional in ARMv8.0
622 and are required in ARMv8.1 and later. Runtime detection for
623 the instruction is used on GNU/Linux, FreeBSD, Windows, and
624 macOS. If the compiler flags indicate unconditional CRC32
625 instruction support (+crc) then the generic version is not
628 * Added lz4 support to xzdiff/xzcmp and xzgrep.
630 * Man pages of xzdiff/xzcmp, xzgrep, and xzmore were rewritten
631 to simplify licensing of the man page translations.
635 - Updated Chinese (simplified), German, Korean, Polish,
636 Romanian, Spanish, Swedish, and Ukrainian translations.
638 - Updated German, Korean, Romanian, and Ukrainian man page
641 * Small improvements to the tests.
643 * Added doc/examples/11_file_info.c. It was added to the Git
644 repository in 2017 but forgotten to be added into distribution
647 * Removed doc/examples_old. These were from 2012.
649 * Removed the macos/build.sh script. It had not been updated
653 5.5.1alpha (2024-01-26)
655 * Added a new filter for RISC-V binaries. The filter can be used
656 for 32-bit and 64-bit binaries with either little or big
657 endianness. In liblzma, the Filter ID is LZMA_FILTER_RISCV (0x0B)
658 and the xz option is --riscv. liblzma filter string syntax
659 recognizes this filter as "riscv".
663 - Added lzma_mt_block_size() to recommend a Block size for
664 multithreaded encoding
666 - Added CLMUL-based CRC32 on x86-64 and E2K with runtime
667 processor detection. Similar to CRC64, on 32-bit x86 it
668 isn't available unless --disable-assembler is used.
670 - Implemented GNU indirect function (IFUNC) as a runtime
671 function dispatching method for CRC32 and CRC64 fast
672 implementations on x86. Only GNU/Linux (glibc) and FreeBSD
673 builds will use IFUNC, unless --enable-ifunc is specified to
676 - Added definitions of mask values like
677 LZMA_INDEX_CHECK_MASK_CRC32 to <lzma/index.h>.
679 - The XZ logo is now included in the Doxygen generated
680 documentation. It is licensed under Creative Commons
681 Attribution-ShareAlike 4.0.
685 - Multithreaded mode is now the default. This improves
686 compression speed and creates .xz files that can be
687 decompressed multithreaded at the cost of increased memory
688 usage and slightly worse compression ratio.
690 - Added new command line option --filters to set the filter
691 chain using liblzma filter string syntax.
693 - Added new command line options --filters1 ... --filters9 to
694 set additional filter chains using liblzma filter string
695 syntax. The --block-list option now allows specifying filter
696 chains that were set using these new options.
698 - Added support for Linux Landlock as a sandboxing method.
700 - xzdec now supports pledge(2), Capsicum, and Linux Landlock as
703 - Progress indicator time stats remain accurate after pausing
706 - Ported xz and xzdec to Windows MSVC. Visual Studio 2015 or
711 - Supports pledge(2), Capsicum, and Linux Landlock sandboxing
714 - Replacement functions for getopt_long() are used on platforms
717 * Enabled unaligned access by default on PowerPC64LE and on RISC-V
718 targets that define __riscv_misaligned_fast.
722 - Added two new fuzz targets to OSS-Fuzz.
724 - Implemented Continuous Integration (CI) testing using
727 * Changed quoting style from `...' to '...' in all messages,
728 scripts, and documentation.
730 * Added basic Codespell support to help catch typo errors.
735 * Not changed: Memory sanitizer (MSAN) has a false positive
736 in the CRC CLMUL code which also makes OSS Fuzz unhappy.
737 Valgrind is smarter and doesn't complain.
739 A revision to the CLMUL code is coming anyway and this issue
740 will be cleaned up as part of it. It won't be backported to
741 5.6.x or 5.4.x because the old code isn't wrong. There is
742 no reason to risk introducing regressions in old branches
743 just to silence a false positive.
747 - lzma_index_decoder() and lzma_index_buffer_decode(): Fix
748 a missing output pointer initialization (*i = NULL) if the
749 functions are called with invalid arguments. The API docs
750 say that such an initialization is always done. In practice
751 this matters very little because the problem can only occur
752 if the calling application has a bug and these functions
753 return LZMA_PROG_ERROR.
755 - lzma_str_to_filters(): Fix a missing output pointer
756 initialization (*error_pos = 0). This is very similar
759 - Fix C standard conformance with function pointer types.
760 This newly showed up with Clang 17 with -fsanitize=undefined.
761 There are no bug reports about this.
763 - Fix building with NVIDIA HPC SDK.
767 - Fix a C standard conformance issue in --block-list parsing
768 (arithmetic on a null pointer).
770 - Fix a warning from GNU groff when processing the man page:
771 "warning: cannot select font 'CW'"
773 - Fix outdated threading related information on the man page.
777 - With "less" version 451 and later, use "||-" instead of "|-"
778 in the environment variable LESSOPEN. This way compressed
779 files that contain no uncompressed data are shown correctly
782 - With "less" version 632 and later, use --show-preproc-errors
783 to make "less" show a warning on decompression errors.
785 * Autotools-based build system (configure):
787 - Symbol versioning variant can now be overridden with
788 --enable-symbol-versions. Documentation in INSTALL was
793 - Linux on MicroBlaze is handled specially now. This matches
794 the changes made to the Autotools-based build in XZ Utils
797 - Disable symbol versioning on non-glibc Linux to match what
798 the Autotools build does. For example, symbol versioning
799 isn't enabled with musl.
801 - Symbol versioning variant can now be overridden by setting
802 SYMBOL_VERSIONING to "OFF", "generic", or "linux".
806 - Clarify the description of --disable-assembler in INSTALL.
807 The option only affects 32-bit x86 assembly usage.
809 - Add doc/examples/11_file_info.c. It was added to the
810 Git repository in 2017 but forgotten to be added into
811 distribution tarballs.
813 - Don't install the TODO file as part of the documentation.
814 The file is out of date.
816 - Update home page URLs back to their old locations on
819 - Update maintainer info.
824 * Fixed a bug involving internal function pointers in liblzma not
825 being initialized to NULL. The bug can only be triggered if
826 lzma_filters_update() is called on a LZMA1 encoder, so it does
827 not affect xz or any application known to us that uses liblzma.
831 - Fixed a regression introduced in 5.4.2 that caused encoding
832 in the raw format to unnecessarily fail if --suffix was not
833 used. For instance, the following command no longer reports
834 that --suffix must be used:
836 echo foo | xz --format=raw --lzma2 | wc -c
838 - Fixed an issue on MinGW-w64 builds that prevented reading
839 from or writing to non-terminal character devices like NUL.
848 - Use __attribute__((__no_sanitize_address__)) to avoid address
849 sanitization with CRC64 CLMUL. It uses 16-byte-aligned reads
850 which can extend past the bounds of the input buffer and
851 inherently trigger address sanitization errors. This isn't
854 - Fixed an assertion failure that could be triggered by a large
855 unpadded_size argument. It was verified that there was no
856 other bug than the assertion failure.
858 - Fixed a bug that prevented building with Windows Vista
859 threading when __attribute__((__constructor__)) is not
862 * xz now properly handles special files such as "con" or "nul" on
863 Windows. Before this fix, the following wrote "foo" to the
864 console and deleted the input file "con_xz":
866 echo foo | xz > con_xz
867 xz --suffix=_xz --decompress con_xz
871 - Allow builds with Windows win95 threading and small mode when
872 __attribute__((__constructor__)) is supported.
874 - Added a new line to liblzma.pc for MSYS2 (Windows):
876 Cflags.private: -DLZMA_API_STATIC
878 When compiling code that will link against static liblzma,
879 the LZMA_API_STATIC macro needs to be defined on Windows.
881 - CMake specific changes:
883 * Fixed a bug that allowed CLOCK_MONOTONIC to be used even
884 if the check for it failed.
886 * Fixed a bug where configuring CMake multiple times
887 resulted in HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC
890 * Fixed the build with MinGW-w64-based Clang/LLVM 17.
891 llvm-windres now has more accurate GNU windres emulation
892 so the GNU windres workaround from 5.4.1 is needed with
893 llvm-windres version 17 too.
895 * The import library on Windows is now properly named
896 "liblzma.dll.a" instead of "libliblzma.dll.a"
898 * Fixed a bug causing the Ninja Generator to fail on
899 UNIX-like systems. This bug was introduced in 5.4.0.
901 * Added a new option to disable CLMUL CRC64.
903 * A module-definition (.def) file is now created when
904 building liblzma.dll with MinGW-w64.
906 * The pkg-config liblzma.pc file is now installed on all
907 builds except when using MSVC on Windows.
909 * Added large file support by default for platforms that
910 need it to handle files larger than 2 GiB. This includes
911 MinGW-w64, even 64-bit builds.
913 * Small fixes and improvements to the tests.
915 * Updated translations: Chinese (simplified) and Esperanto.
920 * liblzma and xzdec can now build against WASI SDK when threading
921 support is disabled. xz and tests don't build yet.
925 - Fixed a bug preventing other projects from including liblzma
926 multiple times using find_package().
928 - Don't create broken symlinks in Cygwin and MSYS2 unless
929 supported by the environment. This prevented building for the
930 default MSYS2 environment. The problem was introduced in
935 - Small improvements to man pages.
937 - Small improvements and typo fixes for liblzma API
942 - Added a new section to INSTALL to describe basic test usage
943 and address recent questions about building the tests when
946 - Small fixes and improvements to the tests.
950 - Fixed a mistake that caused one of the error messages to not
951 be translated. This only affected versions 5.4.2 and 5.4.3.
953 - Updated the Chinese (simplified), Croatian, Esperanto, German,
954 Korean, Polish, Romanian, Spanish, Swedish, Ukrainian, and
955 Vietnamese translations.
957 - Updated the German, Korean, Romanian, and Ukrainian man page
963 * All fixes from 5.2.12
965 * Features in the CMake build can now be disabled as CMake cache
966 variables, similar to the Autotools build.
968 * Minor update to the Croatian translation.
973 * All fixes from 5.2.11 that were not included in 5.4.1.
975 * If xz is built with support for the Capsicum sandbox but running
976 in an environment that doesn't support Capsicum, xz now runs
977 normally without sandboxing instead of exiting with an error.
981 - Documentation was updated to improve the style, consistency,
982 and completeness of the liblzma API headers.
984 - The Doxygen-generated HTML documentation for the liblzma API
985 header files is now included in the source release and is
986 installed as part of "make install". All JavaScript is
987 removed to simplify license compliance and to reduce the
990 - Fixed a minor bug in lzma_str_from_filters() that produced
991 too many filters in the output string instead of reporting
992 an error if the input array had more than four filters. This
993 bug did not affect xz.
997 - autogen.sh now invokes the doxygen tool via the new wrapper
998 script doxygen/update-doxygen, unless the command line option
999 --no-doxygen is used.
1001 - Added microlzma_encoder.c and microlzma_decoder.c to the
1002 VS project files for Windows and to the CMake build. These
1003 should have been included in 5.3.2alpha.
1007 - Added a test to the CMake build that was forgotten in the
1010 - Added and refactored a few tests.
1014 - Updated the Brazilian Portuguese translation.
1016 - Added Brazilian Portuguese man page translation.
1023 - Fixed the return value of lzma_microlzma_encoder() if the
1024 LZMA options lc/lp/pb are invalid. Invalid lc/lp/pb options
1025 made the function return LZMA_STREAM_END without encoding
1026 anything instead of returning LZMA_OPTIONS_ERROR.
1028 - Windows / Visual Studio: Workaround a possible compiler bug
1029 when targeting 32-bit x86 and compiling the CLMUL version of
1030 the CRC64 code. The CLMUL code isn't enabled by the Windows
1031 project files but it is in the CMake-based builds.
1035 - Windows-specific CMake changes:
1037 * Don't try to enable CLMUL CRC64 code if _mm_set_epi64x()
1038 isn't available. This fixes CMake-based build with Visual
1041 * Created a workaround for a build failure with windres
1042 from GNU binutils. It is used only when the C compiler
1043 is GCC (not Clang). The workaround is incompatible
1044 with llvm-windres, resulting in "XZx20Utils" instead
1045 of "XZ Utils" in the resource file, but without the
1046 workaround llvm-windres works correctly. See the
1047 comment in CMakeLists.txt for details.
1049 * Included the resource files in the xz and xzdec build
1050 rules. Building the command line tools is still
1051 experimental but possible with MinGW-w64.
1053 - Visual Studio: Added stream_decoder_mt.c to the project
1054 files. Now the threaded decompressor lzma_stream_decoder_mt()
1055 gets built. CMake-based build wasn't affected.
1057 - Updated windows/INSTALL-MSVC.txt to mention that CMake-based
1058 build is now the preferred method with Visual Studio. The
1059 project files will probably be removed after 5.4.x releases.
1061 - Changes to #defines in config.h:
1063 * HAVE_DECL_CLOCK_MONOTONIC was replaced by
1064 HAVE_CLOCK_MONOTONIC. The old macro was always defined
1065 in configure-generated config.h to either 0 or 1. The
1066 new macro is defined (to 1) only if the declaration of
1067 CLOCK_MONOTONIC is available. This matches the way most
1068 other config.h macros work and makes things simpler with
1069 other build systems.
1071 * HAVE_DECL_PROGRAM_INVOCATION_NAME was replaced by
1072 HAVE_PROGRAM_INVOCATION_NAME for the same reason.
1076 - Fixed test script compatibility with ancient /bin/sh
1077 versions. Now the five test_compress_* tests should
1078 no longer fail on Solaris 10.
1080 - Added and refactored a few tests.
1084 - Updated the Catalan and Esperanto translations.
1086 - Added Korean and Ukrainian man page translations.
1091 This bumps the minor version of liblzma because new features were
1092 added. The API and ABI are still backward compatible with liblzma
1097 * All fixes from 5.2.10.
1099 * The ARM64 filter is now stable. The xz option is now --arm64.
1100 Decompression requires XZ Utils 5.4.0. In the future the ARM64
1101 filter will be supported by XZ for Java, XZ Embedded (including
1102 the version in Linux), LZMA SDK, and 7-Zip.
1106 - Updated Catalan, Croatian, German, Romanian, and Turkish
1109 - Updated German man page translations.
1111 - Added Romanian man page translations.
1113 Summary of new features added in the 5.3.x development releases:
1117 - Added threaded .xz decompressor lzma_stream_decoder_mt().
1118 It can use multiple threads with .xz files that have multiple
1119 Blocks with size information in Block Headers. The threaded
1120 encoder in xz has always created such files.
1122 Single-threaded encoder cannot store the size information in
1123 Block Headers even if one used LZMA_FULL_FLUSH to create
1124 multiple Blocks, so this threaded decoder cannot use multiple
1125 threads with such files.
1127 If there are multiple Streams (concatenated .xz files), one
1128 Stream will be decompressed completely before starting the
1131 - A new decoder flag LZMA_FAIL_FAST was added. It makes the
1132 threaded decompressor report errors soon instead of first
1133 flushing all pending data before the error location.
1136 * LZMA_FILTER_ARM64 is for ARM64 binaries.
1137 * LZMA_FILTER_LZMA1EXT is for raw LZMA1 streams that don't
1138 necessarily use the end marker.
1140 - Added lzma_str_to_filters(), lzma_str_from_filters(), and
1141 lzma_str_list_filters() to convert a preset or a filter chain
1142 string to a lzma_filter[] and vice versa. These should make
1143 it easier to write applications that allow users to specify
1144 custom compression options.
1146 - Added lzma_filters_free() which can be convenient for freeing
1147 the filter options in a filter chain (an array of lzma_filter
1150 - lzma_file_info_decoder() to makes it a little easier to get
1151 the Index field from .xz files. This helps in getting the
1152 uncompressed file size but an easy-to-use random access
1153 API is still missing which has existed in XZ for Java for
1156 - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
1157 It is used by erofs-utils and may be used by others too.
1159 The MicroLZMA format is a raw LZMA stream (without end marker)
1160 whose first byte (always 0x00) has been replaced with
1161 bitwise-negation of the LZMA properties (lc/lp/pb). It was
1162 created for use in EROFS but may be used in other contexts
1163 as well where it is important to avoid wasting bytes for
1164 stream headers or footers. The format is also supported by
1165 XZ Embedded (the XZ Embedded version in Linux got MicroLZMA
1166 support in Linux 5.16).
1168 The MicroLZMA encoder API in liblzma can compress into a
1169 fixed-sized output buffer so that as much data is compressed
1170 as can be fit into the buffer while still creating a valid
1171 MicroLZMA stream. This is needed for EROFS.
1173 - Added lzma_lzip_decoder() to decompress the .lz (lzip) file
1174 format version 0 and the original unextended version 1 files.
1175 Also lzma_auto_decoder() supports .lz files.
1177 - lzma_filters_update() can now be used with the multi-threaded
1178 encoder (lzma_stream_encoder_mt()) to change the filter chain
1179 after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
1181 - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
1182 finders that require at least 3 or 4. Now it is internally
1183 rounded up if needed.
1185 - CLMUL-based CRC64 on x86-64 and E2K with runtime processor
1186 detection. On 32-bit x86 it currently isn't available unless
1187 --disable-assembler is used which can make the non-CLMUL
1188 CRC64 slower; this might be fixed in the future.
1190 - Building with --disable-threads --enable-small
1191 is now thread-safe if the compiler supports
1192 __attribute__((__constructor__)).
1196 - Using -T0 (--threads=0) will now use multi-threaded encoder
1197 even on a single-core system. This is to ensure that output
1198 from the same xz binary is identical on both single-core and
1201 - --threads=+1 or -T+1 is now a way to put xz into
1202 multi-threaded mode while using only one worker thread.
1203 The + is ignored if the number is not 1.
1205 - A default soft memory usage limit is now used for compression
1206 when -T0 is used and no explicit limit has been specified.
1207 This soft limit is used to restrict the number of threads
1208 but if the limit is exceeded with even one thread then xz
1209 will continue with one thread using the multi-threaded
1210 encoder and this limit is ignored. If the number of threads
1211 is specified manually then no default limit will be used;
1212 this affects only -T0.
1214 This change helps on systems that have very many cores and
1215 using all of them for xz makes no sense. Previously xz -T0
1216 could run out of memory on such systems because it attempted
1217 to reserve memory for too many threads.
1219 This also helps with 32-bit builds which don't have a large
1220 amount of address space that would be required for many
1221 threads. The default soft limit for -T0 is at most 1400 MiB
1222 on all 32-bit platforms.
1224 - Previously a low value in --memlimit-compress wouldn't cause
1225 xz to switch from multi-threaded mode to single-threaded mode
1226 if the limit cannot otherwise be met; xz failed instead. Now
1227 xz can switch to single-threaded mode and then, if needed,
1228 scale down the LZMA2 dictionary size too just like it already
1229 did when it was started in single-threaded mode.
1231 - The option --no-adjust no longer prevents xz from scaling down
1232 the number of threads as that doesn't affect the compressed
1233 output (only performance). Now --no-adjust only prevents
1234 adjustments that affect compressed output, that is, with
1235 --no-adjust xz won't switch from multi-threaded mode to
1236 single-threaded mode and won't scale down the LZMA2
1239 - Added a new option --memlimit-mt-decompress=LIMIT. This is
1240 used to limit the number of decompressor threads (possibly
1241 falling back to single-threaded mode) but it will never make
1242 xz refuse to decompress a file. This has a system-specific
1243 default value because without any limit xz could end up
1244 allocating memory for the whole compressed input file, the
1245 whole uncompressed output file, multiple thread-specific
1246 decompressor instances and so on. Basically xz could
1247 attempt to use an insane amount of memory even with fairly
1248 common files. The system-specific default value is currently
1249 the same as the one used for compression with -T0.
1251 The new option works together with the existing option
1252 --memlimit-decompress=LIMIT. The old option sets a hard limit
1253 that must not be exceeded (xz will refuse to decompress)
1254 while the new option only restricts the number of threads.
1255 If the limit set with --memlimit-mt-decompress is greater
1256 than the limit set with --memlimit-compress, then the latter
1257 value is used also for --memlimit-mt-decompress.
1259 - Added new information to the output of xz --info-memory and
1260 new fields to the output of xz --robot --info-memory.
1262 - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
1263 now that liblzma handles it.
1265 - Don't mention endianness for ARM and ARM-Thumb filters in
1266 --long-help. The filters only work for little endian
1267 instruction encoding but modern ARM processors using
1268 big endian data access still use little endian
1269 instruction encoding. So the help text was misleading.
1270 In contrast, the PowerPC filter is only for big endian
1271 32/64-bit PowerPC code. Little endian PowerPC would need
1274 - Added decompression support for the .lz (lzip) file format
1275 version 0 and the original unextended version 1. It is
1276 autodetected by default. See also the option --format on
1279 - Sandboxing enabled by default:
1280 * Capsicum (FreeBSD)
1281 * pledge(2) (OpenBSD)
1283 * Scripts now support the .lz format using xz.
1285 * A few new tests were added.
1287 * The liblzma-specific tests are now supported in CMake-based
1288 builds too ("make test").
1291 5.3.5beta (2022-12-01)
1293 * All fixes from 5.2.9.
1297 - Added new LZMA_FILTER_LZMA1EXT for raw encoder and decoder to
1298 handle raw LZMA1 streams that don't have end of payload marker
1299 (EOPM) alias end of stream (EOS) marker. It can be used in
1300 filter chains, for example, with the x86 BCJ filter.
1302 - Added lzma_str_to_filters(), lzma_str_from_filters(), and
1303 lzma_str_list_filters() to make it easier for applications
1304 to get custom compression options from a user and convert
1305 it to an array of lzma_filter structures.
1307 - Added lzma_filters_free().
1309 - lzma_filters_update() can now be used with the multi-threaded
1310 encoder (lzma_stream_encoder_mt()) to change the filter chain
1311 after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
1313 - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
1314 finders that require at least 3 or 4. Now it is internally
1315 rounded up if needed.
1317 - ARM64 filter was modified. It is still experimental.
1319 - Fixed LTO build with Clang if -fgnuc-version=10 or similar
1320 was used to make Clang look like GCC >= 10. Now it uses
1321 __has_attribute(__symver__) which should be reliable.
1325 - --threads=+1 or -T+1 is now a way to put xz into multi-threaded
1326 mode while using only one worker thread.
1328 - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
1329 now that liblzma handles it.
1331 * Updated translations: Chinese (simplified), Korean, and Turkish.
1334 5.3.4alpha (2022-11-15)
1336 * All fixes from 5.2.7 and 5.2.8.
1340 - Minor improvements to the threaded decoder.
1342 - Added CRC64 implementation that uses SSSE3, SSE4.1, and CLMUL
1343 instructions on 32/64-bit x86 and E2K. On 32-bit x86 it's
1344 not enabled unless --disable-assembler is used but then
1345 the non-CLMUL code might be slower. Processor support is
1346 detected at runtime so this is built by default on x86-64
1347 and E2K. On these platforms, if compiler flags indicate
1348 unconditional CLMUL support (-msse4.1 -mpclmul) then the
1349 generic version is not built, making liblzma 8-9 KiB smaller
1350 compared to having both versions included.
1352 With extremely compressible files this can make decompression
1353 up to twice as fast but with typical files 5 % improvement
1354 is a more realistic expectation.
1356 The CLMUL version is slower than the generic version with
1357 tiny inputs (especially at 1-8 bytes per call, but up to
1358 16 bytes). In normal use in xz this doesn't matter at all.
1360 - Added an experimental ARM64 filter. This is *not* the final
1361 version! Files created with this experimental version won't
1362 be supported in the future versions! The filter design is
1363 a compromise where improving one use case makes some other
1366 - Added decompression support for the .lz (lzip) file format
1367 version 0 and the original unextended version 1. See the
1368 API docs of lzma_lzip_decoder() for details. Also
1369 lzma_auto_decoder() supports .lz files.
1371 - Building with --disable-threads --enable-small
1372 is now thread-safe if the compiler supports
1373 __attribute__((__constructor__))
1377 - Added support for OpenBSD's pledge(2) as a sandboxing method.
1379 - Don't mention endianness for ARM and ARM-Thumb filters in
1380 --long-help. The filters only work for little endian
1381 instruction encoding but modern ARM processors using
1382 big endian data access still use little endian
1383 instruction encoding. So the help text was misleading.
1384 In contrast, the PowerPC filter is only for big endian
1385 32/64-bit PowerPC code. Little endian PowerPC would need
1388 - Added --experimental-arm64. This will be renamed once the
1389 filter is finished. Files created with this experimental
1390 filter will not be supported in the future!
1392 - Added new fields to the output of xz --robot --info-memory.
1394 - Added decompression support for the .lz (lzip) file format
1395 version 0 and the original unextended version 1. It is
1396 autodetected by default. See also the option --format on
1399 * Scripts now support the .lz format using xz.
1403 - New #defines in config.h: HAVE_ENCODER_ARM64,
1404 HAVE_DECODER_ARM64, HAVE_LZIP_DECODER, HAVE_CPUID_H,
1405 HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR, HAVE_USABLE_CLMUL
1407 - New configure options: --disable-clmul-crc,
1408 --disable-microlzma, --disable-lzip-decoder, and
1409 'pledge' is now an option in --enable-sandbox (but
1410 it's autodetected by default anyway).
1412 - INSTALL was updated to document the new configure options.
1414 - PACKAGERS now lists also --disable-microlzma and
1415 --disable-lzip-decoder as configure options that must
1416 not be used in builds for non-embedded use.
1420 - Fix some of the tests so that they skip instead of fail if
1421 certain features have been disabled with configure options.
1422 It's still not perfect.
1424 - Other improvements to tests.
1426 * Updated translations: Croatian, Finnish, Hungarian, Polish,
1427 Romanian, Spanish, Swedish, and Ukrainian.
1430 5.3.3alpha (2022-08-22)
1432 * All fixes from 5.2.6.
1436 - Fixed 32-bit build.
1438 - Added threaded .xz decompressor lzma_stream_decoder_mt().
1439 It can use multiple threads with .xz files that have multiple
1440 Blocks with size information in Block Headers. The threaded
1441 encoder in xz has always created such files.
1443 Single-threaded encoder cannot store the size information in
1444 Block Headers even if one used LZMA_FULL_FLUSH to create
1445 multiple Blocks, so this threaded decoder cannot use multiple
1446 threads with such files.
1448 If there are multiple Streams (concatenated .xz files), one
1449 Stream will be decompressed completely before starting the
1452 - A new decoder flag LZMA_FAIL_FAST was added. It makes the
1453 threaded decompressor report errors soon instead of first
1454 flushing all pending data before the error location.
1458 - Using -T0 (--threads=0) will now use multi-threaded encoder
1459 even on a single-core system. This is to ensure that output
1460 from the same xz binary is identical on both single-core and
1463 - A default soft memory usage limit is now used for compression
1464 when -T0 is used and no explicit limit has been specified.
1465 This soft limit is used to restrict the number of threads
1466 but if the limit is exceeded with even one thread then xz
1467 will continue with one thread using the multi-threaded
1468 encoder and this limit is ignored. If the number of threads
1469 is specified manually then no default limit will be used;
1470 this affects only -T0.
1472 This change helps on systems that have very many cores and
1473 using all of them for xz makes no sense. Previously xz -T0
1474 could run out of memory on such systems because it attempted
1475 to reserve memory for too many threads.
1477 This also helps with 32-bit builds which don't have a large
1478 amount of address space that would be required for many
1479 threads. The default limit is 1400 MiB on all 32-bit
1482 Now xz -T0 should just work. It might use too few threads
1483 in some cases but at least it shouldn't easily run out of
1484 memory. It's possible that this will be tweaked before 5.4.0.
1486 - Changes to --memlimit-compress and --no-adjust:
1488 In single-threaded mode, --memlimit-compress can make xz
1489 scale down the LZMA2 dictionary size to meet the memory usage
1490 limit. This obviously affects the compressed output. However,
1491 if xz was in threaded mode, --memlimit-compress could make xz
1492 reduce the number of threads but it wouldn't make xz switch
1493 from multi-threaded mode to single-threaded mode or scale
1494 down the LZMA2 dictionary size. This seemed illogical.
1496 Now --memlimit-compress can make xz switch to single-threaded
1497 mode if one thread in multi-threaded mode uses too much
1498 memory. If memory usage is still too high, then the LZMA2
1499 dictionary size can be scaled down too.
1501 The option --no-adjust was also changed so that it no longer
1502 prevents xz from scaling down the number of threads as that
1503 doesn't affect compressed output (only performance). After
1504 this commit --no-adjust only prevents adjustments that affect
1505 compressed output, that is, with --no-adjust xz won't switch
1506 from multithreaded mode to single-threaded mode and won't
1507 scale down the LZMA2 dictionary size.
1509 - Added a new option --memlimit-mt-decompress=LIMIT. This is
1510 used to limit the number of decompressor threads (possibly
1511 falling back to single-threaded mode) but it will never make
1512 xz refuse to decompress a file. This has a system-specific
1513 default value because without any limit xz could end up
1514 allocating memory for the whole compressed input file, the
1515 whole uncompressed output file, multiple thread-specific
1516 decompressor instances and so on. Basically xz could
1517 attempt to use an insane amount of memory even with fairly
1520 The new option works together with the existing option
1521 --memlimit-decompress=LIMIT. The old option sets a hard limit
1522 that must not be exceeded (xz will refuse to decompress)
1523 while the new option only restricts the number of threads.
1524 If the limit set with --memlimit-mt-decompress is greater
1525 than the limit set with --memlimit-compress, then the latter
1526 value is used also for --memlimit-mt-decompress.
1530 - Added a few more tests.
1532 - Added tests/code_coverage.sh to create a code coverage report
1537 - Automake's parallel test harness is now used to make tests
1540 - Added the CMake files to the distribution tarball. These were
1541 supposed to be in 5.2.5 already.
1543 - Added liblzma tests to the CMake build.
1545 - Windows: Fix building of liblzma.dll with the included
1546 Visual Studio project files.
1549 5.3.2alpha (2021-10-28)
1551 This release was made on short notice so that recent erofs-utils can
1552 be built with LZMA support without needing a snapshot from xz.git.
1553 Thus many pending things were not included, not even updated
1554 translations (which would need to be updated for the new --list
1557 * All fixes from 5.2.5.
1561 - When copying metadata from the source file to the destination
1562 file, don't try to set the group (GID) if it is already set
1563 correctly. This avoids a failure on OpenBSD (and possibly on
1564 a few other OSes) where files may get created so that their
1565 group doesn't belong to the user, and fchown(2) can fail even
1566 if it needs to do nothing.
1568 - The --keep option now accepts symlinks, hardlinks, and
1569 setuid, setgid, and sticky files. Previously this required
1572 - Split the long strings used in --list and --info-memory modes
1573 to make them much easier for translators.
1575 - If built with sandbox support and enabling the sandbox fails,
1576 xz will now immediately exit with exit status of 1. Previously
1577 it would only display a warning if -vv was used.
1579 - Cap --memlimit-compress to 2000 MiB on MIPS32 because on
1580 MIPS32 userspace processes are limited to 2 GiB of address
1585 - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
1586 The API is in lzma/container.h.
1588 The MicroLZMA format is a raw LZMA stream (without end marker)
1589 whose first byte (always 0x00) has been replaced with
1590 bitwise-negation of the LZMA properties (lc/lp/pb). It was
1591 created for use in EROFS but may be used in other contexts
1592 as well where it is important to avoid wasting bytes for
1593 stream headers or footers. The format is also supported by
1596 The MicroLZMA encoder API in liblzma can compress into a
1597 fixed-sized output buffer so that as much data is compressed
1598 as can be fit into the buffer while still creating a valid
1599 MicroLZMA stream. This is needed for EROFS.
1601 - Added fuzzing support.
1603 - Support Intel Control-flow Enforcement Technology (CET) in
1604 32-bit x86 assembly files.
1606 - Visual Studio: Use non-standard _MSVC_LANG to detect C++
1607 standard version in the lzma.h API header. It's used to
1608 detect when "noexcept" can be used.
1612 - Fix exit status of xzdiff/xzcmp. Exit status could be 2 when
1613 the correct value is 1.
1615 - Fix exit status of xzgrep.
1617 - Detect corrupt .bz2 files in xzgrep.
1619 - Add zstd support to xzgrep and xzdiff/xzcmp.
1621 - Fix less(1) version detection in xzless. It failed if the
1622 version number from "less -V" contained a dot.
1624 * Fix typos and technical issues in man pages.
1628 - Windows: Fix building of resource files when config.h isn't
1629 used. CMake + Visual Studio can now build liblzma.dll.
1631 - Various fixes to the CMake support. It might still need a few
1632 more fixes even for liblzma-only builds.
1635 5.3.1alpha (2018-04-29)
1637 * All fixes from 5.2.4.
1639 * Add lzma_file_info_decoder() into liblzma and use it in xz to
1640 implement the --list feature.
1642 * Capsicum sandbox support is enabled by default where available
1650 - lzma_index_append(): Fix an assertion failure that could be
1651 triggered by a large unpadded_size argument. It was verified
1652 that there was no other bug than the assertion failure.
1654 - lzma_index_decoder() and lzma_index_buffer_decode(): Fix
1655 a missing output pointer initialization (*i = NULL) if the
1656 functions are called with invalid arguments. The API docs
1657 say that such an initialization is always done. In practice
1658 this matters very little because the problem can only occur
1659 if the calling application has a bug and these functions
1660 return LZMA_PROG_ERROR.
1662 - Fix C standard conformance with function pointer types.
1663 This newly showed up with Clang 17 with -fsanitize=undefined.
1664 There are no bug reports about this.
1666 - Fix building with NVIDIA HPC SDK.
1668 - Fix building with Windows Vista threads and --enable-small.
1669 (CMake build doesn't support ENABLE_SMALL in XZ Utils 5.2.x.)
1673 - Fix a C standard conformance issue in --block-list parsing
1674 (arithmetic on a null pointer).
1676 - Fix a warning from GNU groff when processing the man page:
1677 "warning: cannot select font 'CW'"
1679 - Windows: Handle special files such as "con" or "nul". Earlier
1680 the following wrote "foo" to the console and deleted the input
1683 echo foo | xz > con_xz
1684 xz --suffix=_xz --decompress con_xz
1686 - Windows: Fix an issue that prevented reading from or writing
1687 to non-terminal character devices like NUL.
1691 - With "less" version 451 and later, use "||-" instead of "|-"
1692 in the environment variable LESSOPEN. This way compressed
1693 files that contain no uncompressed data are shown correctly
1696 - With "less" version 632 and later, use --show-preproc-errors
1697 to make "less" show a warning on decompression errors.
1701 - Add a new line to liblzma.pc for MSYS2 (Windows):
1703 Cflags.private: -DLZMA_API_STATIC
1705 When compiling code that will link against static liblzma,
1706 the LZMA_API_STATIC macro needs to be defined on Windows.
1708 - Autotools (configure):
1710 * Symbol versioning variant can now be overridden with
1711 --enable-symbol-versions. Documentation in INSTALL was
1716 * Fix a bug that prevented other projects from including
1717 liblzma multiple times using find_package().
1719 * Fix a bug where configuring CMake multiple times resulted
1720 in HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC not being
1723 * Fix the build with MinGW-w64-based Clang/LLVM 17.
1724 llvm-windres now has more accurate GNU windres emulation
1725 so the GNU windres workaround from 5.4.1 is needed with
1726 llvm-windres version 17 too.
1728 * The import library on Windows is now properly named
1729 "liblzma.dll.a" instead of "libliblzma.dll.a"
1731 * Add large file support by default for platforms that
1732 need it to handle files larger than 2 GiB. This includes
1733 MinGW-w64, even 64-bit builds.
1735 * Linux on MicroBlaze is handled specially now. This
1736 matches the changes made to the Autotools-based build
1737 in XZ Utils 5.4.2 and 5.2.11.
1739 * Disable symbol versioning on non-glibc Linux to match
1740 what the Autotools build does. For example, symbol
1741 versioning isn't enabled with musl.
1743 * Symbol versioning variant can now be overridden by
1744 setting SYMBOL_VERSIONING to "OFF", "generic", or
1749 - Clarify the description of --disable-assembler in INSTALL.
1750 The option only affects 32-bit x86 assembly usage.
1752 - Don't install the TODO file as part of the documentation.
1753 The file is out of date.
1755 - Update home page URLs back to their old locations on
1758 - Update maintainer info.
1763 * Fixed a build system bug that prevented building liblzma as a
1764 shared library when configured with --disable-threads. This bug
1765 affected releases 5.2.6 to 5.2.11 and 5.4.0 to 5.4.2.
1767 * Include <intrin.h> for Windows intrinsic functions where they are
1768 needed. This fixed a bug that prevented building liblzma using
1769 clang-cl on Windows.
1771 * Minor update to the Croatian translation. The small change
1772 applies to a string in both 5.2 and 5.4 branches.
1777 * Removed all possible cases of null pointer + 0. It is undefined
1778 behavior in C99 and C17. This was detected by a sanitizer and had
1779 not caused any known issues.
1783 - Added a workaround for building with GCC on MicroBlaze Linux.
1784 GCC 12 on MicroBlaze doesn't support the __symver__ attribute
1785 even though __has_attribute(__symver__) returns true. The
1786 build is now done without the extra RHEL/CentOS 7 symbols
1787 that were added in XZ Utils 5.2.7. The workaround only
1788 applies to the Autotools build (not CMake).
1790 - CMake: Ensure that the C compiler language is set to C99 or
1793 - CMake changes from XZ Utils 5.4.1:
1795 * Added a workaround for a build failure with
1796 windres from GNU binutils.
1798 * Included the Windows resource files in the xz
1799 and xzdec build rules.
1804 * xz: Don't modify argv[] when parsing the --memlimit* and
1805 --block-list command line options. This fixes confusing
1806 arguments in process listing (like "ps auxf").
1808 * GNU/Linux only: Use __has_attribute(__symver__) to detect if
1809 that attribute is supported. This fixes build on Mandriva where
1810 Clang is patched to define __GNUC__ to 11 by default (instead
1811 of 4 as used by Clang upstream).
1818 - Fixed an infinite loop in LZMA encoder initialization
1819 if dict_size >= 2 GiB. (The encoder only supports up
1822 - Fixed two cases of invalid free() that can happen if
1823 a tiny allocation fails in encoder re-initialization
1824 or in lzma_filters_update(). These bugs had some
1825 similarities with the bug fixed in 5.2.7.
1827 - Fixed lzma_block_encoder() not allowing the use of
1828 LZMA_SYNC_FLUSH with lzma_code() even though it was
1829 documented to be supported. The sync-flush code in
1830 the Block encoder was already used internally via
1831 lzma_stream_encoder(), so this was just a missing flag
1832 in the lzma_block_encoder() API function.
1834 - GNU/Linux only: Don't put symbol versions into static
1835 liblzma as it breaks things in some cases (and even if
1836 it didn't break anything, symbol versions in static
1837 libraries are useless anyway). The downside of the fix
1838 is that if the configure options --with-pic or --without-pic
1839 are used then it's not possible to build both shared and
1840 static liblzma at the same time on GNU/Linux anymore;
1841 with those options --disable-static or --disable-shared
1844 * New email address for bug reports is <xz@tukaani.org> which
1845 forwards messages to Lasse Collin and Jia Tan.
1852 - If xz cannot remove an input file when it should, this
1853 is now treated as a warning (exit status 2) instead of
1854 an error (exit status 1). This matches GNU gzip and it
1855 is more logical as at that point the output file has
1856 already been successfully closed.
1858 - Fix handling of .xz files with an unsupported check type.
1859 Previously such printed a warning message but then xz
1860 behaved as if an error had occurred (didn't decompress,
1861 exit status 1). Now a warning is printed, decompression
1862 is done anyway, and exit status is 2. This used to work
1863 slightly before 5.0.0. In practice this bug matters only
1864 if xz has been built with some check types disabled. As
1865 instructed in PACKAGERS, such builds should be done in
1866 special situations only.
1868 - Fix "xz -dc --single-stream tests/files/good-0-empty.xz"
1869 which failed with "Internal error (bug)". That is,
1870 --single-stream was broken if the first .xz stream in
1871 the input file didn't contain any uncompressed data.
1873 - Fix displaying file sizes in the progress indicator when
1874 working in passthru mode and there are multiple input files.
1875 Just like "gzip -cdf", "xz -cdf" works like "cat" when the
1876 input file isn't a supported compressed file format. In
1877 this case the file size counters weren't reset between
1878 files so with multiple input files the progress indicator
1879 displayed an incorrect (too large) value.
1883 - API docs in lzma/container.h:
1884 * Update the list of decoder flags in the decoder
1886 * Explain LZMA_CONCATENATED behavior with .lzma files
1887 in lzma_auto_decoder() docs.
1889 - OpenBSD: Use HW_NCPUONLINE to detect the number of
1890 available hardware threads in lzma_physmem().
1892 - Fix use of wrong macro to detect x86 SSE2 support.
1893 __SSE2_MATH__ was used with GCC/Clang but the correct
1894 one is __SSE2__. The first one means that SSE2 is used
1895 for floating point math which is irrelevant here.
1896 The affected SSE2 code isn't used on x86-64 so this affects
1897 only 32-bit x86 builds that use -msse2 without -mfpmath=sse
1898 (there is no runtime detection for SSE2). It improves LZMA
1899 compression speed (not decompression).
1901 - Fix the build with Intel C compiler 2021 (ICC, not ICX)
1902 on Linux. It defines __GNUC__ to 10 but doesn't support
1903 the __symver__ attribute introduced in GCC 10.
1905 * Scripts: Ignore warnings from xz by using --quiet --no-warn.
1906 This is needed if the input .xz files use an unsupported
1911 - Updated Croatian and Turkish translations.
1913 - One new translations wasn't included because it needed
1914 technical fixes. It will be in upcoming 5.4.0. No new
1915 translations will be added to the 5.2.x branch anymore.
1917 - Renamed the French man page translation file from
1918 fr_FR.po to fr.po and thus also its install directory
1919 (like /usr/share/man/fr_FR -> .../fr).
1921 - Man page translations for upcoming 5.4.0 are now handled
1922 in the Translation Project.
1924 * Update doc/faq.txt a little so it's less out-of-date.
1931 - Made lzma_filters_copy() to never modify the destination
1932 array if an error occurs. lzma_stream_encoder() and
1933 lzma_stream_encoder_mt() already assumed this. Before this
1934 change, if a tiny memory allocation in lzma_filters_copy()
1935 failed it would lead to a crash (invalid free() or invalid
1936 memory reads) in the cleanup paths of these two encoder
1937 initialization functions.
1939 - Added missing integer overflow check to lzma_index_append().
1940 This affects xz --list and other applications that decode
1941 the Index field from .xz files using lzma_index_decoder().
1942 Normal decompression of .xz files doesn't call this code
1943 and thus most applications using liblzma aren't affected
1946 - Single-threaded .xz decoder (lzma_stream_decoder()): If
1947 lzma_code() returns LZMA_MEMLIMIT_ERROR it is now possible
1948 to use lzma_memlimit_set() to increase the limit and continue
1949 decoding. This was supposed to work from the beginning
1950 but there was a bug. With other decoders (.lzma or
1951 threaded .xz decoder) this already worked correctly.
1953 - Fixed accumulation of integrity check type statistics in
1954 lzma_index_cat(). This bug made lzma_index_checks() return
1955 only the type of the integrity check of the last Stream
1956 when multiple lzma_indexes were concatenated. Most
1957 applications don't use these APIs but in xz it made
1958 xz --list not list all check types from concatenated .xz
1959 files. In xz --list --verbose only the per-file "Check:"
1960 lines were affected and in xz --robot --list only the "file"
1963 - Added ABI compatibility with executables that were linked
1964 against liblzma in RHEL/CentOS 7 or other liblzma builds
1965 that had copied the problematic patch from RHEL/CentOS 7
1966 (xz-5.2.2-compat-libs.patch). For the details, see the
1967 comment at the top of src/liblzma/validate_map.sh.
1969 WARNING: This uses __symver__ attribute with GCC >= 10.
1970 In other cases the traditional __asm__(".symver ...")
1971 is used. Using link-time optimization (LTO, -flto) with
1972 GCC versions older than 10 can silently result in
1973 broken liblzma.so.5 (incorrect symbol versions)! If you
1974 want to use -flto with GCC, you must use GCC >= 10.
1975 LTO with Clang seems to work even with the traditional
1976 __asm__(".symver ...") method.
1978 * xzgrep: Fixed compatibility with old shells that break if
1979 comments inside command substitutions have apostrophes (').
1980 This problem was introduced in 5.2.6.
1984 - New #define in config.h: HAVE_SYMBOL_VERSIONS_LINUX
1986 - Windows: Fixed liblzma.dll build with Visual Studio project
1987 files. It broke in 5.2.6 due to a change that was made to
1988 improve CMake support.
1990 - Windows: Building liblzma with UNICODE defined should now
1993 - CMake files are now actually included in the release tarball.
1994 They should have been in 5.2.5 already.
1996 - Minor CMake fixes and improvements.
1998 * Added a new translation: Turkish
2005 - The --keep option now accepts symlinks, hardlinks, and
2006 setuid, setgid, and sticky files. Previously this required
2009 - When copying metadata from the source file to the destination
2010 file, don't try to set the group (GID) if it is already set
2011 correctly. This avoids a failure on OpenBSD (and possibly on
2012 a few other OSes) where files may get created so that their
2013 group doesn't belong to the user, and fchown(2) can fail even
2014 if it needs to do nothing.
2016 - Cap --memlimit-compress to 2000 MiB instead of 4020 MiB on
2017 MIPS32 because on MIPS32 userspace processes are limited
2018 to 2 GiB of address space.
2022 - Fixed a missing error-check in the threaded encoder. If a
2023 small memory allocation fails, a .xz file with an invalid
2024 Index field would be created. Decompressing such a file would
2025 produce the correct output but result in an error at the end.
2026 Thus this is a "mild" data corruption bug. Note that while
2027 a failed memory allocation can trigger the bug, it cannot
2028 cause invalid memory access.
2030 - The decoder for .lzma files now supports files that have
2031 uncompressed size stored in the header and still use the
2032 end of payload marker (end of stream marker) at the end
2033 of the LZMA stream. Such files are rare but, according to
2034 the documentation in LZMA SDK, they are valid.
2035 doc/lzma-file-format.txt was updated too.
2037 - Improved 32-bit x86 assembly files:
2038 * Support Intel Control-flow Enforcement Technology (CET)
2039 * Use non-executable stack on FreeBSD.
2041 - Visual Studio: Use non-standard _MSVC_LANG to detect C++
2042 standard version in the lzma.h API header. It's used to
2043 detect when "noexcept" can be used.
2047 - Fixed arbitrary command injection via a malicious filename
2048 (CVE-2022-1271, ZDI-CAN-16587). A standalone patch for
2049 this was released to the public on 2022-04-07. A slight
2050 robustness improvement has been made since then and, if
2051 using GNU or *BSD grep, a new faster method is now used
2052 that doesn't use the old sed-based construct at all. This
2053 also fixes bad output with GNU grep >= 3.5 (2020-09-27)
2054 when xzgrepping binary files.
2056 This vulnerability was discovered by:
2057 cleemy desu wayo working with Trend Micro Zero Day Initiative
2059 - Fixed detection of corrupt .bz2 files.
2061 - Improved error handling to fix exit status in some situations
2062 and to fix handling of signals: in some situations a signal
2063 didn't make xzgrep exit when it clearly should have. It's
2064 possible that the signal handling still isn't quite perfect
2065 but hopefully it's good enough.
2067 - Documented exit statuses on the man page.
2069 - xzegrep and xzfgrep now use "grep -E" and "grep -F" instead
2070 of the deprecated egrep and fgrep commands.
2072 - Fixed parsing of the options -E, -F, -G, -P, and -X. The
2073 problem occurred when multiple options were specified in
2074 a single argument, for example,
2076 echo foo | xzgrep -Fe foo
2078 treated foo as a filename because -Fe wasn't correctly
2081 - Added zstd support.
2085 - Fixed wrong exit status. Exit status could be 2 when the
2088 - Documented on the man page that exit status of 2 is used
2089 for decompression errors.
2091 - Added zstd support.
2095 - Fix less(1) version detection. It failed if the version number
2096 from "less -V" contained a dot.
2100 - Added new translations: Catalan, Croatian, Esperanto,
2101 Korean, Portuguese, Romanian, Serbian, Spanish, Swedish,
2104 - Updated the Brazilian Portuguese translation.
2106 - Added French man page translation. This and the existing
2107 German translation aren't complete anymore because the
2108 English man pages got a few updates and the translators
2109 weren't reached so that they could update their work.
2113 - Windows: Fix building of resource files when config.h isn't
2114 used. CMake + Visual Studio can now build liblzma.dll.
2116 - Various fixes to the CMake support. Building static or shared
2117 liblzma should work fine in most cases. In contrast, building
2118 the command line tools with CMake is still clearly incomplete
2119 and experimental and should be used for testing only.
2126 - Fixed several C99/C11 conformance bugs. Now the code is clean
2127 under gcc/clang -fsanitize=undefined. Some of these changes
2128 might have a negative effect on performance with old GCC
2129 versions or compilers other than GCC and Clang. The configure
2130 option --enable-unsafe-type-punning can be used to (mostly)
2131 restore the old behavior but it shouldn't normally be used.
2133 - Improved API documentation of lzma_properties_decode().
2135 - Added a very minor encoder speed optimization.
2139 - Fixed a crash in "xz -dcfv not_an_xz_file". All four options
2140 were required to trigger it. The crash occurred in the
2141 progress indicator code when xz was in passthru mode where
2142 xz works like "cat".
2144 - Fixed an integer overflow with 32-bit off_t. It could happen
2145 when decompressing a file that has a long run of zero bytes
2146 which xz would try to write as a sparse file. Since the build
2147 system enables large file support by default, off_t is
2148 normally 64-bit even on 32-bit systems.
2150 - Fixes for --flush-timeout:
2151 * Fix semi-busy-waiting.
2152 * Avoid unneeded flushes when no new input has arrived
2153 since the previous flush was completed.
2155 - Added a special case for 32-bit xz: If --memlimit-compress is
2156 used to specify a limit that exceeds 4020 MiB, the limit will
2157 be set to 4020 MiB. The values "0" and "max" aren't affected
2158 by this and neither is decompression. This hack can be
2159 helpful when a 32-bit xz has access to 4 GiB address space
2160 but the specified memlimit exceeds 4 GiB. This can happen
2161 e.g. with some scripts.
2163 - Capsicum sandbox is now enabled by default where available
2164 (FreeBSD >= 10). The sandbox debug messages (xz -vv) were
2165 removed since they seemed to be more annoying than useful.
2167 - DOS build now requires DJGPP 2.05 instead of 2.04beta.
2168 A workaround for a locale problem with DJGPP 2.05 was added.
2170 * xzgrep and other scripts:
2172 - Added a configure option --enable-path-for-scripts=PREFIX.
2173 It is disabled by default except on Solaris where the default
2174 is /usr/xpg4/bin. See INSTALL for details.
2176 - Added a workaround for a POSIX shell detection problem on
2181 - Added preliminary build instructions for z/OS. See INSTALL
2184 - Experimental CMake support was added. It should work to build
2185 static liblzma on a few operating systems. It may or may not
2186 work to build shared liblzma. On some platforms it can build
2187 xz and xzdec too but those are only for testing. See the
2188 comment in the beginning of CMakeLists.txt for details.
2190 - Visual Studio project files were updated.
2191 WindowsTargetPlatformVersion was removed from VS2017 files
2192 and set to "10.0" in the added VS2019 files. In the future
2193 the VS project files will be removed when CMake support is
2196 - New #defines in config.h: HAVE___BUILTIN_ASSUME_ALIGNED,
2197 HAVE___BUILTIN_BSWAPXX, and TUKLIB_USE_UNSAFE_TYPE_PUNNING.
2199 - autogen.sh has a new optional dependency on po4a and a new
2200 option --no-po4a to skip that step. This matters only if one
2201 wants to remake the build files. po4a is used to update the
2202 translated man pages but as long as the man pages haven't
2203 been modified, there's nothing to update and one can use
2204 --no-po4a to avoid the dependency on po4a.
2208 - XZ Utils translations are now handled by the Translation
2209 Project: https://translationproject.org/domain/xz.html
2211 - All man pages are now included in German too.
2213 - New xz translations: Brazilian Portuguese, Finnish,
2214 Hungarian, Chinese (simplified), Chinese (traditional),
2215 and Danish (partial translation)
2217 - Updated xz translations: French, German, Italian, and Polish
2219 - Unfortunately a few new xz translations weren't included due
2220 to technical problems like too long lines in --help output or
2221 misaligned column headings in tables. In the future, many of
2222 these strings will be split and e.g. the table column
2223 alignment will be handled in software. This should make the
2224 strings easier to translate.
2231 - Allow 0 as memory usage limit instead of returning
2232 LZMA_PROG_ERROR. Now 0 is treated as if 1 byte was specified,
2233 which effectively is the same as 0.
2235 - Use "noexcept" keyword instead of "throw()" in the public
2236 headers when a C++11 (or newer standard) compiler is used.
2238 - Added a portability fix for recent Intel C Compilers.
2240 - Microsoft Visual Studio build files have been moved under
2241 windows/vs2013 and windows/vs2017.
2245 - Fix "xz --list --robot missing_or_bad_file.xz" which would
2246 try to print an uninitialized string and thus produce garbage
2247 output. Since the exit status is non-zero, most uses of such
2248 a command won't try to interpret the garbage output.
2250 - "xz --list foo.xz" could print "Internal error (bug)" in a
2251 corner case where a specific memory usage limit had been set.
2258 - Always close a file before trying to delete it to avoid
2259 problems on some operating system and file system combinations.
2261 - Fixed copying of file timestamps on Windows.
2263 - Added experimental (disabled by default) sandbox support using
2264 Capsicum (FreeBSD >= 10). See --enable-sandbox in INSTALL.
2266 * C99/C11 conformance fixes to liblzma. The issues affected at least
2267 some builds using link-time optimizations.
2269 * Fixed bugs in the rarely-used function lzma_index_dup().
2271 * Use of external SHA-256 code is now disabled by default.
2272 It can still be enabled by passing --enable-external-sha256
2273 to configure. The reasons to disable it by default (see INSTALL
2276 - Some OS-specific SHA-256 implementations conflict with
2277 OpenSSL and cause problems in programs that link against both
2278 liblzma and libcrypto. At least FreeBSD 10 and MINIX 3.3.0
2281 - The internal SHA-256 is faster than the SHA-256 code in
2282 some operating systems.
2284 * Changed CPU core count detection to use sched_getaffinity() on
2285 GNU/Linux and GNU/kFreeBSD.
2287 * Fixes to the build-system and xz to make xz buildable even when
2288 encoders, decoders, or threading have been disabled from libilzma
2289 using configure options. These fixes added two new #defines to
2290 config.h: HAVE_ENCODERS and HAVE_DECODERS.
2295 * Fixed bugs in QNX-specific code.
2297 * Omitted the use of pipe2() even if it is available to avoid
2298 portability issues with some old Linux and glibc combinations.
2300 * Updated German translation.
2302 * Added project files to build static and shared liblzma (not the
2303 whole XZ Utils) with Visual Studio 2013 update 2 or later.
2305 * Documented that threaded decompression hasn't been implemented
2306 yet. A 5.2.0 NEWS entry describing multi-threading support had
2307 incorrectly said "decompression" when it should have said
2313 * Fixed a compression-ratio regression in fast mode of LZMA1 and
2314 LZMA2. The bug is present in 5.1.4beta and 5.2.0 releases.
2316 * Fixed a portability problem in xz that affected at least OpenBSD.
2318 * Fixed xzdiff to be compatible with FreeBSD's mktemp which differs
2319 from most other mktemp implementations.
2321 * Changed CPU core count detection to use cpuset_getaffinity() on
2329 * All fixes from 5.0.8
2331 * liblzma: Fixed lzma_stream_encoder_mt_memusage() when a preset
2334 * xzdiff: If mktemp isn't installed, mkdir will be used as
2335 a fallback to create a temporary directory. Installing mktemp
2336 is still recommended.
2338 * Updated French, German, Italian, Polish, and Vietnamese
2341 Summary of fixes and new features added in the 5.1.x development
2346 - Added support for multi-threaded compression. See the
2347 lzma_mt structure, lzma_stream_encoder_mt(), and
2348 lzma_stream_encoder_mt_memusage() in <lzma/container.h>,
2349 lzma_get_progress() in <lzma/base.h>, and lzma_cputhreads()
2350 in <lzma/hardware.h> for details.
2352 - Made the uses of lzma_allocator const correct.
2354 - Added lzma_block_uncomp_encode() to create uncompressed
2355 .xz Blocks using LZMA2 uncompressed chunks.
2357 - Added support for LZMA_IGNORE_CHECK.
2359 - A few speed optimizations were made.
2361 - Added support for symbol versioning. It is enabled by default
2362 on GNU/Linux, other GNU-based systems, and FreeBSD.
2364 - liblzma (not the whole XZ Utils) should now be buildable
2365 with MSVC 2013 update 2 or later using windows/config.h.
2369 - Fixed a race condition in the signal handling. It was
2370 possible that e.g. the first SIGINT didn't make xz exit
2371 if reading or writing blocked and one had bad luck. The fix
2372 is non-trivial, so as of writing it is unknown if it will be
2373 backported to the v5.0 branch.
2375 - Multi-threaded compression can be enabled with the
2376 --threads (-T) option.
2377 [Fixed: This originally said "decompression".]
2379 - New command line options in xz: --single-stream,
2380 --block-size=SIZE, --block-list=SIZES,
2381 --flush-timeout=TIMEOUT, and --ignore-check.
2383 - xz -lvv now shows the minimum xz version that is required to
2384 decompress the file. Currently it is 5.0.0 for all supported
2385 .xz files except files with empty LZMA2 streams require 5.0.2.
2387 * xzdiff and xzgrep now support .lzo files if lzop is installed.
2388 The .tzo suffix is also recognized as a shorthand for .tar.lzo.
2391 5.1.4beta (2014-09-14)
2393 * All fixes from 5.0.6
2395 * liblzma: Fixed the use of presets in threaded encoder
2398 * xz --block-list and --block-size can now be used together
2399 in single-threaded mode. Previously the combination only
2400 worked in multi-threaded mode.
2402 * Added support for LZMA_IGNORE_CHECK to liblzma and made it
2403 available in xz as --ignore-check.
2405 * liblzma speed optimizations:
2407 - Initialization of a new LZMA1 or LZMA2 encoder has been
2408 optimized. (The speed of reinitializing an already-allocated
2409 encoder isn't affected.) This helps when compressing many
2410 small buffers with lzma_stream_buffer_encode() and other
2411 similar situations where an already-allocated encoder state
2412 isn't reused. This speed-up is visible in xz too if one
2413 compresses many small files one at a time instead running xz
2414 once and giving all files as command-line arguments.
2416 - Buffer comparisons are now much faster when unaligned access
2417 is allowed (configured with --enable-unaligned-access). This
2418 speeds up encoding significantly. There is arch-specific code
2419 for 32-bit and 64-bit x86 (32-bit needs SSE2 for the best
2420 results and there's no run-time CPU detection for now).
2421 For other archs there is only generic code which probably
2422 isn't as optimal as arch-specific solutions could be.
2424 - A few speed optimizations were made to the SHA-256 code.
2425 (Note that the builtin SHA-256 code isn't used on all
2428 * liblzma can now be built with MSVC 2013 update 2 or later
2429 using windows/config.h.
2431 * Vietnamese translation was added.
2434 5.1.3alpha (2013-10-26)
2436 * All fixes from 5.0.5
2440 - Fixed a deadlock in the threaded encoder.
2442 - Made the uses of lzma_allocator const correct.
2444 - Added lzma_block_uncomp_encode() to create uncompressed
2445 .xz Blocks using LZMA2 uncompressed chunks.
2447 - Added support for native threads on Windows and the ability
2448 to detect the number of CPU cores.
2452 - Fixed a race condition in the signal handling. It was
2453 possible that e.g. the first SIGINT didn't make xz exit
2454 if reading or writing blocked and one had bad luck. The fix
2455 is non-trivial, so as of writing it is unknown if it will be
2456 backported to the v5.0 branch.
2458 - Made the progress indicator work correctly in threaded mode.
2460 - Threaded encoder now works together with --block-list=SIZES.
2462 - Added preliminary support for --flush-timeout=TIMEOUT.
2463 It can be useful for (somewhat) real-time streaming. For
2464 now the decompression side has to be done with something
2465 else than the xz tool due to how xz does buffering, but this
2469 5.1.2alpha (2012-07-04)
2471 * All fixes from 5.0.3 and 5.0.4
2475 - Fixed a deadlock and an invalid free() in the threaded encoder.
2477 - Added support for symbol versioning. It is enabled by default
2478 on GNU/Linux, other GNU-based systems, and FreeBSD.
2480 - Use SHA-256 implementation from the operating system if one is
2481 available in libc, libmd, or libutil. liblzma won't use e.g.
2482 OpenSSL or libgcrypt to avoid introducing new dependencies.
2484 - Fixed liblzma.pc for static linking.
2486 - Fixed a few portability bugs.
2488 * xz --decompress --single-stream now fixes the input position after
2489 successful decompression. Now the following works:
2491 echo foo | xz > foo.xz
2492 echo bar | xz >> foo.xz
2493 ( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
2495 Note that it doesn't work if the input is not seekable
2496 or if there is Stream Padding between the concatenated
2499 * xz -lvv now shows the minimum xz version that is required to
2500 decompress the file. Currently it is 5.0.0 for all supported .xz
2501 files except files with empty LZMA2 streams require 5.0.2.
2503 * Added an *incomplete* implementation of --block-list=SIZES to xz.
2504 It only works correctly in single-threaded mode and when
2505 --block-size isn't used at the same time. --block-list allows
2506 specifying the sizes of Blocks which can be useful e.g. when
2507 creating files for random-access reading.
2510 5.1.1alpha (2011-04-12)
2512 * All fixes from 5.0.2
2514 * liblzma fixes that will also be included in 5.0.3:
2516 - A memory leak was fixed.
2518 - lzma_stream_buffer_encode() no longer creates an empty .xz
2519 Block if encoding an empty buffer. Such an empty Block with
2520 LZMA2 data would trigger a bug in 5.0.1 and older (see the
2521 first bullet point in 5.0.2 notes). When releasing 5.0.2,
2522 I thought that no encoder creates this kind of files but
2525 - Validate function arguments better in a few functions. Most
2526 importantly, specifying an unsupported integrity check to
2527 lzma_stream_buffer_encode() no longer creates a corrupt .xz
2528 file. Probably no application tries to do that, so this
2529 shouldn't be a big problem in practice.
2531 - Document that lzma_block_buffer_encode(),
2532 lzma_easy_buffer_encode(), lzma_stream_encoder(), and
2533 lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
2535 - The return values of the _memusage() functions are now
2538 * Support for multithreaded compression was added using the simplest
2539 method, which splits the input data into blocks and compresses
2540 them independently. Other methods will be added in the future.
2541 The current method has room for improvement, e.g. it is possible
2542 to reduce the memory usage.
2544 * Added the options --single-stream and --block-size=SIZE to xz.
2546 * xzdiff and xzgrep now support .lzo files if lzop is installed.
2547 The .tzo suffix is also recognized as a shorthand for .tar.lzo.
2549 * Support for short 8.3 filenames under DOS was added to xz. It is
2550 experimental and may change before it gets into a stable release.
2555 * Fixed an old bug in xzgrep that affected OpenBSD and probably
2556 a few other operating systems too.
2558 * Updated French and German translations.
2560 * Added support for detecting the amount of RAM on AmigaOS/AROS.
2562 * Minor build system updates.
2567 * Fix regressions introduced in 5.0.6:
2569 - Fix building with non-GNU make.
2571 - Fix invalid Libs.private value in liblzma.pc which broke
2572 static linking against liblzma if the linker flags were
2573 taken from pkg-config.
2578 * xzgrep now exits with status 0 if at least one file matched.
2580 * A few minor portability and build system fixes
2585 * lzmadec and liblzma's lzma_alone_decoder(): Support decompressing
2586 .lzma files that have less common settings in the headers
2587 (dictionary size other than 2^n or 2^n + 2^(n-1), or uncompressed
2588 size greater than 256 GiB). The limitations existed to avoid false
2589 positives when detecting .lzma files. The lc + lp <= 4 limitation
2590 still remains since liblzma's LZMA decoder has that limitation.
2592 NOTE: xz's .lzma support or liblzma's lzma_auto_decoder() are NOT
2593 affected by this change. They still consider uncommon .lzma headers
2594 as not being in the .lzma format. Changing this would give way too
2595 many false positives.
2599 - Interaction of preset and custom filter chain options was
2600 made less illogical. This affects only certain less typical
2601 uses cases so few people are expected to notice this change.
2603 Now when a custom filter chain option (e.g. --lzma2) is
2604 specified, all preset options (-0 ... -9, -e) earlier are on
2605 the command line are completely forgotten. Similarly, when
2606 a preset option is specified, all custom filter chain options
2607 earlier on the command line are completely forgotten.
2609 Example 1: "xz -9 --lzma2=preset=5 -e" is equivalent to "xz -e"
2610 which is equivalent to "xz -6e". Earlier -e didn't put xz back
2611 into preset mode and thus the example command was equivalent
2612 to "xz --lzma2=preset=5".
2614 Example 2: "xz -9e --lzma2=preset=5 -7" is equivalent to
2615 "xz -7". Earlier a custom filter chain option didn't make
2616 xz forget the -e option so the example was equivalent to
2619 - Fixes and improvements to error handling.
2621 - Various fixes to the man page.
2623 * xzless: Fixed to work with "less" versions 448 and later.
2625 * xzgrep: Made -h an alias for --no-filename.
2627 * Include the previously missing debug/translation.bash which can
2628 be useful for translators.
2630 * Include a build script for Mac OS X. This has been in the Git
2631 repository since 2010 but due to a mistake in Makefile.am the
2632 script hasn't been included in a release tarball before.
2639 - Fix lzma_index_init(). It could crash if memory allocation
2642 - Fix the possibility of an incorrect LZMA_BUF_ERROR when a BCJ
2643 filter is used and the application only provides exactly as
2644 much output space as is the uncompressed size of the file.
2646 - Fix a bug in doc/examples_old/xz_pipe_decompress.c. It didn't
2647 check if the last call to lzma_code() really returned
2648 LZMA_STREAM_END, which made the program think that truncated
2651 - New example programs in doc/examples (old programs are now in
2652 doc/examples_old). These have more comments and more detailed
2655 * Fix "xz -lvv foo.xz". It could crash on some corrupted files.
2657 * Fix output of "xz --robot -lv" and "xz --robot -lvv" which
2658 incorrectly printed the filename also in the "foo (x/x)" format.
2660 * Fix exit status of "xzdiff foo.xz bar.xz".
2662 * Fix exit status of "xzgrep foo binary_file".
2664 * Fix portability to EBCDIC systems.
2666 * Fix a configure issue on AIX with the XL C compiler. See INSTALL
2669 * Update French, German, Italian, and Polish translations.
2676 - A memory leak was fixed.
2678 - lzma_stream_buffer_encode() no longer creates an empty .xz
2679 Block if encoding an empty buffer. Such an empty Block with
2680 LZMA2 data would trigger a bug in 5.0.1 and older (see the
2681 first bullet point in 5.0.2 notes). When releasing 5.0.2,
2682 I thought that no encoder creates this kind of files but
2685 - Validate function arguments better in a few functions. Most
2686 importantly, specifying an unsupported integrity check to
2687 lzma_stream_buffer_encode() no longer creates a corrupt .xz
2688 file. Probably no application tries to do that, so this
2689 shouldn't be a big problem in practice.
2691 - Document that lzma_block_buffer_encode(),
2692 lzma_easy_buffer_encode(), lzma_stream_encoder(), and
2693 lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
2695 - The return values of the _memusage() functions are now
2698 * Fix command name detection in xzgrep. xzegrep and xzfgrep now
2699 correctly use egrep and fgrep instead of grep.
2701 * French translation was added.
2706 * LZMA2 decompressor now correctly accepts LZMA2 streams with no
2707 uncompressed data. Previously it considered them corrupt. The
2708 bug can affect applications that use raw LZMA2 streams. It is
2709 very unlikely to affect .xz files because no compressor creates
2710 .xz files with empty LZMA2 streams. (Empty .xz files are a
2711 different thing than empty LZMA2 streams.)
2713 * "xz --suffix=.foo filename.foo" now refuses to compress the
2714 file due to it already having the suffix .foo. It was already
2715 documented on the man page, but the code lacked the test.
2717 * "xzgrep -l foo bar.xz" works now.
2719 * Polish translation was added.
2724 * xz --force now (de)compresses files that have setuid, setgid,
2725 or sticky bit set and files that have multiple hard links.
2726 The man page had it documented this way already, but the code
2729 * gzip and bzip2 support in xzdiff was fixed.
2733 * Minor fix to Czech translation
2738 Only the most important changes compared to 4.999.9beta are listed
2739 here. One change is especially important:
2741 * The memory usage limit is now disabled by default. Some scripts
2742 written before this change may have used --memory=max on xz command
2743 line or in XZ_OPT. THESE USES OF --memory=max SHOULD BE REMOVED
2744 NOW, because they interfere with user's ability to set the memory
2745 usage limit himself. If user-specified limit causes problems to
2746 your script, blame the user.
2748 Other significant changes:
2750 * Added support for XZ_DEFAULTS environment variable. This variable
2751 allows users to set default options for xz, e.g. default memory
2752 usage limit or default compression level. Scripts that use xz
2753 must never set or unset XZ_DEFAULTS. Scripts should use XZ_OPT
2754 instead if they need a way to pass options to xz via an
2755 environment variable.
2757 * The compression settings associated with the preset levels
2758 -0 ... -9 have been changed. --extreme was changed a little too.
2759 It is now less likely to make compression worse, but with some
2760 files the new --extreme may compress slightly worse than the old
2763 * If a preset level (-0 ... -9) is specified after a custom filter
2764 chain options have been used (e.g. --lzma2), the custom filter
2765 chain will be forgotten. Earlier the preset options were
2766 completely ignored after custom filter chain options had been
2769 * xz will create sparse files when decompressing if the uncompressed
2770 data contains long sequences of binary zeros. This is done even
2771 when writing to standard output that is connected to a regular
2772 file and certain additional conditions are met to make it safe.
2774 * Support for "xz --list" was added. Combine with --verbose or
2775 --verbose --verbose (-vv) for detailed output.
2777 * I had hoped that liblzma API would have been stable after
2778 4.999.9beta, but there have been a couple of changes in the
2779 advanced features, which don't affect most applications:
2781 - Index handling code was revised. If you were using the old
2782 API, you will get a compiler error (so it's easy to notice).
2784 - A subtle but important change was made to the Block handling
2785 API. lzma_block.version has to be initialized even for
2786 lzma_block_header_decode(). Code that doesn't do it will work
2787 for now, but might break in the future, which makes this API
2788 change easy to miss.
2790 * The major soname has been bumped to 5.0.0. liblzma API and ABI
2791 are now stable, so the need to recompile programs linking against
2792 liblzma shouldn't arise soon.