7 IMPORTANT: This fixed bugs in the backdoor (CVE-2024-3094) (someone
8 had forgot to run Valgrind).
10 * liblzma: Fixed two bugs relating to GNU indirect function (IFUNC)
11 with GCC. The more serious bug caused a program linked with
12 liblzma to crash on start up if the flag -fprofile-generate was
13 used to build liblzma. The second bug caused liblzma to falsely
14 report an invalid write to Valgrind when loading liblzma.
16 * xz: Changed the messages for thread reduction due to memory
17 constraints to only appear under the highest verbosity level.
21 - Fixed a build issue when the header file <linux/landlock.h>
22 was present on the system but the Landlock system calls were
23 not defined in <sys/syscall.h>.
25 - The CMake build now warns and disables NLS if both gettext
26 tools and pre-created .gmo files are missing. Previously,
27 this caused the CMake build to fail.
29 * Minor improvements to man pages.
31 * Minor improvements to tests.
36 IMPORTANT: This added a backdoor (CVE-2024-3094). It's enabled only
37 in the release tarballs.
39 This bumps the minor version of liblzma because new features were
40 added. The API and ABI are still backward compatible with liblzma
41 5.4.x and 5.2.x and 5.0.x.
43 NOTE: As described in the NEWS for 5.5.2beta, the core components
44 are now under the BSD Zero Clause License (0BSD).
50 - Disabled the branchless C variant in the LZMA decoder based
51 on the benchmark results from the community.
53 - Disabled x86-64 inline assembly on x32 to fix the build.
55 * Sandboxing support in xz:
57 - Landlock is now used even when xz needs to create files.
58 In this case the sandbox has to be more permissive than
59 when no files need to be created. A similar thing was
60 already in use with pledge(2) since 5.3.4alpha.
62 - Landlock and pledge(2) are now stricter when reading from
63 more than one input file and only writing to standard output.
65 - Added support for Landlock ABI version 4.
69 - Default to -O2 instead of -O3 with CMAKE_BUILD_TYPE=Release.
70 -O3 is not useful for speed and makes the code larger.
72 - Now builds lzmainfo and lzmadec.
74 - xzdiff, xzgrep, xzless, xzmore, and their symlinks are now
75 installed. The scripts are also tested during "make test".
77 - Added translation support for xz, lzmainfo, and the
80 - Applied the symbol versioning workaround for MicroBlaze that
81 is used in the Autotools build.
83 - The general XZ Utils and liblzma API documentation is now
86 - The CMake component names were changed a little and several
87 were added. liblzma_Runtime and liblzma_Development are
90 - Minimum required CMake version is now 3.14. However,
91 translation support is disabled with CMake versions
94 - The CMake-based build is now close to feature parity with the
95 Autotools-based build. Most importantly a few tests aren't
96 run yet. Testing the CMake-based build on different operating
97 systems would be welcome now. See the comment at the top of
100 * Fixed a bug in the Autotools feature test for ARM64 CRC32
101 instruction support for old versions of Clang. This did not
102 affect the CMake build.
106 - The build instructions in INSTALL and windows/INSTALL*.txt
107 were revised completely.
109 - windows/build-with-cmake.bat along with the instructions
110 in windows/INSTALL-MinGW-w64_with_CMake.txt should make
111 it very easy to build liblzma.dll and xz.exe on Windows
112 using CMake and MinGW-w64 with either GCC or Clang/LLVM.
114 - windows/build.bash was updated. It now works on MSYS2 and
115 on GNU/Linux (cross-compiling) to create a .zip and .7z
116 package for 32-bit and 64-bit x86 using GCC + MinGW-w64.
118 * The TODO file is no longer installed as part of the
119 documentation. The file is out of date and does not reflect
120 the actual tasks that will be completed in the future.
124 - Translated lzmainfo man pages are now installed. These
125 had been forgotten in earlier versions.
127 - Updated Croatian, Esperanto, German, Hungarian, Korean,
128 Polish, Romanian, Spanish, Swedish, Vietnamese, and Ukrainian
131 - Updated German, Korean, Romanian, and Ukrainian man page
136 Summary of new features added in the 5.5.x development releases:
140 - LZMA decoder: Speed optimizations to the C code and
141 added GCC & Clang compatible inline assembly for x86-64.
143 - Added lzma_mt_block_size() to recommend a Block size for
144 multithreaded encoding.
146 - Added CLMUL-based CRC32 on x86-64 and E2K with runtime
147 processor detection. Similar to CRC64, on 32-bit x86 it
148 isn't available unless --disable-assembler is used.
150 - Optimized the CRC32 calculation on ARM64 platforms using the
151 CRC32 instructions. Runtime detection for the instruction is
152 used on GNU/Linux, FreeBSD, Windows, and macOS. If the
153 compiler flags indicate unconditional CRC32 instruction
154 support (+crc) then the generic version is not built.
156 - Added definitions of mask values like
157 LZMA_INDEX_CHECK_MASK_CRC32 to <lzma/index.h>.
161 - Multithreaded mode is now the default. This improves
162 compression speed and creates .xz files that can be
163 decompressed in multithreaded mode. The downsides are
164 increased memory usage and slightly worse compression ratio.
166 - Added a new command line option --filters to set the filter
167 chain using the liblzma filter string syntax.
169 - Added new command line options --filters1 ... --filters9 to
170 set additional filter chains using the liblzma filter string
171 syntax. The --block-list option now allows specifying filter
172 chains that were set using these new options.
174 - Ported the command line tools to Windows MSVC.
175 Visual Studio 2015 or later is required.
177 * Added lz4 support to xzdiff/xzcmp and xzgrep.
180 5.5.2beta (2024-02-14)
182 * Licensing change: The core components are now under the
183 BSD Zero Clause License (0BSD). In XZ Utils 5.4.6 and older
184 and 5.5.1alpha these components are in the public domain and
185 obviously remain so; the change affects the new releases only.
187 0BSD is an extremely permissive license which doesn't require
188 retaining or reproducing copyright or license notices when
189 distributing the code, thus in practice there is extremely
190 little difference to public domain.
194 - Significant speed optimizations to the LZMA decoder were
195 made. There are now three variants that can be chosen at
198 * Basic C version: This is a few percent faster than
199 5.4.x due to some new optimizations.
201 * Branchless C: This is currently the default on platforms
202 for which there is no assembly code. This should be a few
203 percent faster than the basic C version.
205 * x86-64 inline assembly. This works with GCC and Clang.
207 The default choice can currently be overridden by setting
208 LZMA_RANGE_DECODER_CONFIG in CPPFLAGS: 0 means the basic
209 version and 3 means that branchless C version.
211 - Optimized the CRC32 calculation on ARM64 platforms using the
212 CRC32 instructions. The instructions are optional in ARMv8.0
213 and are required in ARMv8.1 and later. Runtime detection for
214 the instruction is used on GNU/Linux, FreeBSD, Windows, and
215 macOS. If the compiler flags indicate unconditional CRC32
216 instruction support (+crc) then the generic version is not
219 * Added lz4 support to xzdiff/xzcmp and xzgrep.
221 * Man pages of xzdiff/xzcmp, xzgrep, and xzmore were rewritten
222 to simplify licensing of the man page translations.
226 - Updated Chinese (simplified), German, Korean, Polish,
227 Romanian, Spanish, Swedish, and Ukrainian translations.
229 - Updated German, Korean, Romanian, and Ukrainian man page
232 * Small improvements to the tests.
234 * Added doc/examples/11_file_info.c. It was added to the Git
235 repository in 2017 but forgotten to be added into distribution
238 * Removed doc/examples_old. These were from 2012.
240 * Removed the macos/build.sh script. It had not been updated
244 5.5.1alpha (2024-01-26)
246 * Added a new filter for RISC-V binaries. The filter can be used
247 for 32-bit and 64-bit binaries with either little or big
248 endianness. In liblzma, the Filter ID is LZMA_FILTER_RISCV (0x0B)
249 and the xz option is --riscv. liblzma filter string syntax
250 recognizes this filter as "riscv".
254 - Added lzma_mt_block_size() to recommend a Block size for
255 multithreaded encoding
257 - Added CLMUL-based CRC32 on x86-64 and E2K with runtime
258 processor detection. Similar to CRC64, on 32-bit x86 it
259 isn't available unless --disable-assembler is used.
261 - Implemented GNU indirect function (IFUNC) as a runtime
262 function dispatching method for CRC32 and CRC64 fast
263 implementations on x86. Only GNU/Linux (glibc) and FreeBSD
264 builds will use IFUNC, unless --enable-ifunc is specified to
267 - Added definitions of mask values like
268 LZMA_INDEX_CHECK_MASK_CRC32 to <lzma/index.h>.
270 - The XZ logo is now included in the Doxygen generated
271 documentation. It is licensed under Creative Commons
272 Attribution-ShareAlike 4.0.
276 - Multithreaded mode is now the default. This improves
277 compression speed and creates .xz files that can be
278 decompressed multithreaded at the cost of increased memory
279 usage and slightly worse compression ratio.
281 - Added new command line option --filters to set the filter
282 chain using liblzma filter string syntax.
284 - Added new command line options --filters1 ... --filters9 to
285 set additional filter chains using liblzma filter string
286 syntax. The --block-list option now allows specifying filter
287 chains that were set using these new options.
289 - Added support for Linux Landlock as a sandboxing method.
291 - xzdec now supports pledge(2), Capsicum, and Linux Landlock as
294 - Progress indicator time stats remain accurate after pausing
297 - Ported xz and xzdec to Windows MSVC. Visual Studio 2015 or
302 - Supports pledge(2), Capsicum, and Linux Landlock sandboxing
305 - Replacement functions for getopt_long() are used on platforms
308 * Enabled unaligned access by default on PowerPC64LE and on RISC-V
309 targets that define __riscv_misaligned_fast.
313 - Added two new fuzz targets to OSS-Fuzz.
315 - Implemented Continuous Integration (CI) testing using
318 * Changed quoting style from `...' to '...' in all messages,
319 scripts, and documentation.
321 * Added basic Codespell support to help catch typo errors.
326 * Fixed a bug involving internal function pointers in liblzma not
327 being initialized to NULL. The bug can only be triggered if
328 lzma_filters_update() is called on a LZMA1 encoder, so it does
329 not affect xz or any application known to us that uses liblzma.
333 - Fixed a regression introduced in 5.4.2 that caused encoding
334 in the raw format to unnecessarily fail if --suffix was not
335 used. For instance, the following command no longer reports
336 that --suffix must be used:
338 echo foo | xz --format=raw --lzma2 | wc -c
340 - Fixed an issue on MinGW-w64 builds that prevented reading
341 from or writing to non-terminal character devices like NUL.
350 - Use __attribute__((__no_sanitize_address__)) to avoid address
351 sanitization with CRC64 CLMUL. It uses 16-byte-aligned reads
352 which can extend past the bounds of the input buffer and
353 inherently trigger address sanitization errors. This isn't
356 - Fixed an assertion failure that could be triggered by a large
357 unpadded_size argument. It was verified that there was no
358 other bug than the assertion failure.
360 - Fixed a bug that prevented building with Windows Vista
361 threading when __attribute__((__constructor__)) is not
364 * xz now properly handles special files such as "con" or "nul" on
365 Windows. Before this fix, the following wrote "foo" to the
366 console and deleted the input file "con_xz":
368 echo foo | xz > con_xz
369 xz --suffix=_xz --decompress con_xz
373 - Allow builds with Windows win95 threading and small mode when
374 __attribute__((__constructor__)) is supported.
376 - Added a new line to liblzma.pc for MSYS2 (Windows):
378 Cflags.private: -DLZMA_API_STATIC
380 When compiling code that will link against static liblzma,
381 the LZMA_API_STATIC macro needs to be defined on Windows.
383 - CMake specific changes:
385 * Fixed a bug that allowed CLOCK_MONOTONIC to be used even
386 if the check for it failed.
388 * Fixed a bug where configuring CMake multiple times
389 resulted in HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC
392 * Fixed the build with MinGW-w64-based Clang/LLVM 17.
393 llvm-windres now has more accurate GNU windres emulation
394 so the GNU windres workaround from 5.4.1 is needed with
395 llvm-windres version 17 too.
397 * The import library on Windows is now properly named
398 "liblzma.dll.a" instead of "libliblzma.dll.a"
400 * Fixed a bug causing the Ninja Generator to fail on
401 UNIX-like systems. This bug was introduced in 5.4.0.
403 * Added a new option to disable CLMUL CRC64.
405 * A module-definition (.def) file is now created when
406 building liblzma.dll with MinGW-w64.
408 * The pkg-config liblzma.pc file is now installed on all
409 builds except when using MSVC on Windows.
411 * Added large file support by default for platforms that
412 need it to handle files larger than 2 GiB. This includes
413 MinGW-w64, even 64-bit builds.
415 * Small fixes and improvements to the tests.
417 * Updated translations: Chinese (simplified) and Esperanto.
422 * liblzma and xzdec can now build against WASI SDK when threading
423 support is disabled. xz and tests don't build yet.
427 - Fixed a bug preventing other projects from including liblzma
428 multiple times using find_package().
430 - Don't create broken symlinks in Cygwin and MSYS2 unless
431 supported by the environment. This prevented building for the
432 default MSYS2 environment. The problem was introduced in
437 - Small improvements to man pages.
439 - Small improvements and typo fixes for liblzma API
444 - Added a new section to INSTALL to describe basic test usage
445 and address recent questions about building the tests when
448 - Small fixes and improvements to the tests.
452 - Fixed a mistake that caused one of the error messages to not
453 be translated. This only affected versions 5.4.2 and 5.4.3.
455 - Updated the Chinese (simplified), Croatian, Esperanto, German,
456 Korean, Polish, Romanian, Spanish, Swedish, Ukrainian, and
457 Vietnamese translations.
459 - Updated the German, Korean, Romanian, and Ukrainian man page
465 * All fixes from 5.2.12
467 * Features in the CMake build can now be disabled as CMake cache
468 variables, similar to the Autotools build.
470 * Minor update to the Croatian translation.
475 * All fixes from 5.2.11 that were not included in 5.4.1.
477 * If xz is built with support for the Capsicum sandbox but running
478 in an environment that doesn't support Capsicum, xz now runs
479 normally without sandboxing instead of exiting with an error.
483 - Documentation was updated to improve the style, consistency,
484 and completeness of the liblzma API headers.
486 - The Doxygen-generated HTML documentation for the liblzma API
487 header files is now included in the source release and is
488 installed as part of "make install". All JavaScript is
489 removed to simplify license compliance and to reduce the
492 - Fixed a minor bug in lzma_str_from_filters() that produced
493 too many filters in the output string instead of reporting
494 an error if the input array had more than four filters. This
495 bug did not affect xz.
499 - autogen.sh now invokes the doxygen tool via the new wrapper
500 script doxygen/update-doxygen, unless the command line option
501 --no-doxygen is used.
503 - Added microlzma_encoder.c and microlzma_decoder.c to the
504 VS project files for Windows and to the CMake build. These
505 should have been included in 5.3.2alpha.
509 - Added a test to the CMake build that was forgotten in the
512 - Added and refactored a few tests.
516 - Updated the Brazilian Portuguese translation.
518 - Added Brazilian Portuguese man page translation.
525 - Fixed the return value of lzma_microlzma_encoder() if the
526 LZMA options lc/lp/pb are invalid. Invalid lc/lp/pb options
527 made the function return LZMA_STREAM_END without encoding
528 anything instead of returning LZMA_OPTIONS_ERROR.
530 - Windows / Visual Studio: Workaround a possible compiler bug
531 when targeting 32-bit x86 and compiling the CLMUL version of
532 the CRC64 code. The CLMUL code isn't enabled by the Windows
533 project files but it is in the CMake-based builds.
537 - Windows-specific CMake changes:
539 * Don't try to enable CLMUL CRC64 code if _mm_set_epi64x()
540 isn't available. This fixes CMake-based build with Visual
543 * Created a workaround for a build failure with windres
544 from GNU binutils. It is used only when the C compiler
545 is GCC (not Clang). The workaround is incompatible
546 with llvm-windres, resulting in "XZx20Utils" instead
547 of "XZ Utils" in the resource file, but without the
548 workaround llvm-windres works correctly. See the
549 comment in CMakeLists.txt for details.
551 * Included the resource files in the xz and xzdec build
552 rules. Building the command line tools is still
553 experimental but possible with MinGW-w64.
555 - Visual Studio: Added stream_decoder_mt.c to the project
556 files. Now the threaded decompressor lzma_stream_decoder_mt()
557 gets built. CMake-based build wasn't affected.
559 - Updated windows/INSTALL-MSVC.txt to mention that CMake-based
560 build is now the preferred method with Visual Studio. The
561 project files will probably be removed after 5.4.x releases.
563 - Changes to #defines in config.h:
565 * HAVE_DECL_CLOCK_MONOTONIC was replaced by
566 HAVE_CLOCK_MONOTONIC. The old macro was always defined
567 in configure-generated config.h to either 0 or 1. The
568 new macro is defined (to 1) only if the declaration of
569 CLOCK_MONOTONIC is available. This matches the way most
570 other config.h macros work and makes things simpler with
573 * HAVE_DECL_PROGRAM_INVOCATION_NAME was replaced by
574 HAVE_PROGRAM_INVOCATION_NAME for the same reason.
578 - Fixed test script compatibility with ancient /bin/sh
579 versions. Now the five test_compress_* tests should
580 no longer fail on Solaris 10.
582 - Added and refactored a few tests.
586 - Updated the Catalan and Esperanto translations.
588 - Added Korean and Ukrainian man page translations.
593 This bumps the minor version of liblzma because new features were
594 added. The API and ABI are still backward compatible with liblzma
599 * All fixes from 5.2.10.
601 * The ARM64 filter is now stable. The xz option is now --arm64.
602 Decompression requires XZ Utils 5.4.0. In the future the ARM64
603 filter will be supported by XZ for Java, XZ Embedded (including
604 the version in Linux), LZMA SDK, and 7-Zip.
608 - Updated Catalan, Croatian, German, Romanian, and Turkish
611 - Updated German man page translations.
613 - Added Romanian man page translations.
615 Summary of new features added in the 5.3.x development releases:
619 - Added threaded .xz decompressor lzma_stream_decoder_mt().
620 It can use multiple threads with .xz files that have multiple
621 Blocks with size information in Block Headers. The threaded
622 encoder in xz has always created such files.
624 Single-threaded encoder cannot store the size information in
625 Block Headers even if one used LZMA_FULL_FLUSH to create
626 multiple Blocks, so this threaded decoder cannot use multiple
627 threads with such files.
629 If there are multiple Streams (concatenated .xz files), one
630 Stream will be decompressed completely before starting the
633 - A new decoder flag LZMA_FAIL_FAST was added. It makes the
634 threaded decompressor report errors soon instead of first
635 flushing all pending data before the error location.
638 * LZMA_FILTER_ARM64 is for ARM64 binaries.
639 * LZMA_FILTER_LZMA1EXT is for raw LZMA1 streams that don't
640 necessarily use the end marker.
642 - Added lzma_str_to_filters(), lzma_str_from_filters(), and
643 lzma_str_list_filters() to convert a preset or a filter chain
644 string to a lzma_filter[] and vice versa. These should make
645 it easier to write applications that allow users to specify
646 custom compression options.
648 - Added lzma_filters_free() which can be convenient for freeing
649 the filter options in a filter chain (an array of lzma_filter
652 - lzma_file_info_decoder() to makes it a little easier to get
653 the Index field from .xz files. This helps in getting the
654 uncompressed file size but an easy-to-use random access
655 API is still missing which has existed in XZ for Java for
658 - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
659 It is used by erofs-utils and may be used by others too.
661 The MicroLZMA format is a raw LZMA stream (without end marker)
662 whose first byte (always 0x00) has been replaced with
663 bitwise-negation of the LZMA properties (lc/lp/pb). It was
664 created for use in EROFS but may be used in other contexts
665 as well where it is important to avoid wasting bytes for
666 stream headers or footers. The format is also supported by
667 XZ Embedded (the XZ Embedded version in Linux got MicroLZMA
668 support in Linux 5.16).
670 The MicroLZMA encoder API in liblzma can compress into a
671 fixed-sized output buffer so that as much data is compressed
672 as can be fit into the buffer while still creating a valid
673 MicroLZMA stream. This is needed for EROFS.
675 - Added lzma_lzip_decoder() to decompress the .lz (lzip) file
676 format version 0 and the original unextended version 1 files.
677 Also lzma_auto_decoder() supports .lz files.
679 - lzma_filters_update() can now be used with the multi-threaded
680 encoder (lzma_stream_encoder_mt()) to change the filter chain
681 after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
683 - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
684 finders that require at least 3 or 4. Now it is internally
685 rounded up if needed.
687 - CLMUL-based CRC64 on x86-64 and E2K with runtime processor
688 detection. On 32-bit x86 it currently isn't available unless
689 --disable-assembler is used which can make the non-CLMUL
690 CRC64 slower; this might be fixed in the future.
692 - Building with --disable-threads --enable-small
693 is now thread-safe if the compiler supports
694 __attribute__((__constructor__)).
698 - Using -T0 (--threads=0) will now use multi-threaded encoder
699 even on a single-core system. This is to ensure that output
700 from the same xz binary is identical on both single-core and
703 - --threads=+1 or -T+1 is now a way to put xz into
704 multi-threaded mode while using only one worker thread.
705 The + is ignored if the number is not 1.
707 - A default soft memory usage limit is now used for compression
708 when -T0 is used and no explicit limit has been specified.
709 This soft limit is used to restrict the number of threads
710 but if the limit is exceeded with even one thread then xz
711 will continue with one thread using the multi-threaded
712 encoder and this limit is ignored. If the number of threads
713 is specified manually then no default limit will be used;
714 this affects only -T0.
716 This change helps on systems that have very many cores and
717 using all of them for xz makes no sense. Previously xz -T0
718 could run out of memory on such systems because it attempted
719 to reserve memory for too many threads.
721 This also helps with 32-bit builds which don't have a large
722 amount of address space that would be required for many
723 threads. The default soft limit for -T0 is at most 1400 MiB
724 on all 32-bit platforms.
726 - Previously a low value in --memlimit-compress wouldn't cause
727 xz to switch from multi-threaded mode to single-threaded mode
728 if the limit cannot otherwise be met; xz failed instead. Now
729 xz can switch to single-threaded mode and then, if needed,
730 scale down the LZMA2 dictionary size too just like it already
731 did when it was started in single-threaded mode.
733 - The option --no-adjust no longer prevents xz from scaling down
734 the number of threads as that doesn't affect the compressed
735 output (only performance). Now --no-adjust only prevents
736 adjustments that affect compressed output, that is, with
737 --no-adjust xz won't switch from multi-threaded mode to
738 single-threaded mode and won't scale down the LZMA2
741 - Added a new option --memlimit-mt-decompress=LIMIT. This is
742 used to limit the number of decompressor threads (possibly
743 falling back to single-threaded mode) but it will never make
744 xz refuse to decompress a file. This has a system-specific
745 default value because without any limit xz could end up
746 allocating memory for the whole compressed input file, the
747 whole uncompressed output file, multiple thread-specific
748 decompressor instances and so on. Basically xz could
749 attempt to use an insane amount of memory even with fairly
750 common files. The system-specific default value is currently
751 the same as the one used for compression with -T0.
753 The new option works together with the existing option
754 --memlimit-decompress=LIMIT. The old option sets a hard limit
755 that must not be exceeded (xz will refuse to decompress)
756 while the new option only restricts the number of threads.
757 If the limit set with --memlimit-mt-decompress is greater
758 than the limit set with --memlimit-compress, then the latter
759 value is used also for --memlimit-mt-decompress.
761 - Added new information to the output of xz --info-memory and
762 new fields to the output of xz --robot --info-memory.
764 - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
765 now that liblzma handles it.
767 - Don't mention endianness for ARM and ARM-Thumb filters in
768 --long-help. The filters only work for little endian
769 instruction encoding but modern ARM processors using
770 big endian data access still use little endian
771 instruction encoding. So the help text was misleading.
772 In contrast, the PowerPC filter is only for big endian
773 32/64-bit PowerPC code. Little endian PowerPC would need
776 - Added decompression support for the .lz (lzip) file format
777 version 0 and the original unextended version 1. It is
778 autodetected by default. See also the option --format on
781 - Sandboxing enabled by default:
783 * pledge(2) (OpenBSD)
785 * Scripts now support the .lz format using xz.
787 * A few new tests were added.
789 * The liblzma-specific tests are now supported in CMake-based
790 builds too ("make test").
793 5.3.5beta (2022-12-01)
795 * All fixes from 5.2.9.
799 - Added new LZMA_FILTER_LZMA1EXT for raw encoder and decoder to
800 handle raw LZMA1 streams that don't have end of payload marker
801 (EOPM) alias end of stream (EOS) marker. It can be used in
802 filter chains, for example, with the x86 BCJ filter.
804 - Added lzma_str_to_filters(), lzma_str_from_filters(), and
805 lzma_str_list_filters() to make it easier for applications
806 to get custom compression options from a user and convert
807 it to an array of lzma_filter structures.
809 - Added lzma_filters_free().
811 - lzma_filters_update() can now be used with the multi-threaded
812 encoder (lzma_stream_encoder_mt()) to change the filter chain
813 after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
815 - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
816 finders that require at least 3 or 4. Now it is internally
817 rounded up if needed.
819 - ARM64 filter was modified. It is still experimental.
821 - Fixed LTO build with Clang if -fgnuc-version=10 or similar
822 was used to make Clang look like GCC >= 10. Now it uses
823 __has_attribute(__symver__) which should be reliable.
827 - --threads=+1 or -T+1 is now a way to put xz into multi-threaded
828 mode while using only one worker thread.
830 - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
831 now that liblzma handles it.
833 * Updated translations: Chinese (simplified), Korean, and Turkish.
836 5.3.4alpha (2022-11-15)
838 * All fixes from 5.2.7 and 5.2.8.
842 - Minor improvements to the threaded decoder.
844 - Added CRC64 implementation that uses SSSE3, SSE4.1, and CLMUL
845 instructions on 32/64-bit x86 and E2K. On 32-bit x86 it's
846 not enabled unless --disable-assembler is used but then
847 the non-CLMUL code might be slower. Processor support is
848 detected at runtime so this is built by default on x86-64
849 and E2K. On these platforms, if compiler flags indicate
850 unconditional CLMUL support (-msse4.1 -mpclmul) then the
851 generic version is not built, making liblzma 8-9 KiB smaller
852 compared to having both versions included.
854 With extremely compressible files this can make decompression
855 up to twice as fast but with typical files 5 % improvement
856 is a more realistic expectation.
858 The CLMUL version is slower than the generic version with
859 tiny inputs (especially at 1-8 bytes per call, but up to
860 16 bytes). In normal use in xz this doesn't matter at all.
862 - Added an experimental ARM64 filter. This is *not* the final
863 version! Files created with this experimental version won't
864 be supported in the future versions! The filter design is
865 a compromise where improving one use case makes some other
868 - Added decompression support for the .lz (lzip) file format
869 version 0 and the original unextended version 1. See the
870 API docs of lzma_lzip_decoder() for details. Also
871 lzma_auto_decoder() supports .lz files.
873 - Building with --disable-threads --enable-small
874 is now thread-safe if the compiler supports
875 __attribute__((__constructor__))
879 - Added support for OpenBSD's pledge(2) as a sandboxing method.
881 - Don't mention endianness for ARM and ARM-Thumb filters in
882 --long-help. The filters only work for little endian
883 instruction encoding but modern ARM processors using
884 big endian data access still use little endian
885 instruction encoding. So the help text was misleading.
886 In contrast, the PowerPC filter is only for big endian
887 32/64-bit PowerPC code. Little endian PowerPC would need
890 - Added --experimental-arm64. This will be renamed once the
891 filter is finished. Files created with this experimental
892 filter will not be supported in the future!
894 - Added new fields to the output of xz --robot --info-memory.
896 - Added decompression support for the .lz (lzip) file format
897 version 0 and the original unextended version 1. It is
898 autodetected by default. See also the option --format on
901 * Scripts now support the .lz format using xz.
905 - New #defines in config.h: HAVE_ENCODER_ARM64,
906 HAVE_DECODER_ARM64, HAVE_LZIP_DECODER, HAVE_CPUID_H,
907 HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR, HAVE_USABLE_CLMUL
909 - New configure options: --disable-clmul-crc,
910 --disable-microlzma, --disable-lzip-decoder, and
911 'pledge' is now an option in --enable-sandbox (but
912 it's autodetected by default anyway).
914 - INSTALL was updated to document the new configure options.
916 - PACKAGERS now lists also --disable-microlzma and
917 --disable-lzip-decoder as configure options that must
918 not be used in builds for non-embedded use.
922 - Fix some of the tests so that they skip instead of fail if
923 certain features have been disabled with configure options.
924 It's still not perfect.
926 - Other improvements to tests.
928 * Updated translations: Croatian, Finnish, Hungarian, Polish,
929 Romanian, Spanish, Swedish, and Ukrainian.
932 5.3.3alpha (2022-08-22)
934 * All fixes from 5.2.6.
938 - Fixed 32-bit build.
940 - Added threaded .xz decompressor lzma_stream_decoder_mt().
941 It can use multiple threads with .xz files that have multiple
942 Blocks with size information in Block Headers. The threaded
943 encoder in xz has always created such files.
945 Single-threaded encoder cannot store the size information in
946 Block Headers even if one used LZMA_FULL_FLUSH to create
947 multiple Blocks, so this threaded decoder cannot use multiple
948 threads with such files.
950 If there are multiple Streams (concatenated .xz files), one
951 Stream will be decompressed completely before starting the
954 - A new decoder flag LZMA_FAIL_FAST was added. It makes the
955 threaded decompressor report errors soon instead of first
956 flushing all pending data before the error location.
960 - Using -T0 (--threads=0) will now use multi-threaded encoder
961 even on a single-core system. This is to ensure that output
962 from the same xz binary is identical on both single-core and
965 - A default soft memory usage limit is now used for compression
966 when -T0 is used and no explicit limit has been specified.
967 This soft limit is used to restrict the number of threads
968 but if the limit is exceeded with even one thread then xz
969 will continue with one thread using the multi-threaded
970 encoder and this limit is ignored. If the number of threads
971 is specified manually then no default limit will be used;
972 this affects only -T0.
974 This change helps on systems that have very many cores and
975 using all of them for xz makes no sense. Previously xz -T0
976 could run out of memory on such systems because it attempted
977 to reserve memory for too many threads.
979 This also helps with 32-bit builds which don't have a large
980 amount of address space that would be required for many
981 threads. The default limit is 1400 MiB on all 32-bit
984 Now xz -T0 should just work. It might use too few threads
985 in some cases but at least it shouldn't easily run out of
986 memory. It's possible that this will be tweaked before 5.4.0.
988 - Changes to --memlimit-compress and --no-adjust:
990 In single-threaded mode, --memlimit-compress can make xz
991 scale down the LZMA2 dictionary size to meet the memory usage
992 limit. This obviously affects the compressed output. However,
993 if xz was in threaded mode, --memlimit-compress could make xz
994 reduce the number of threads but it wouldn't make xz switch
995 from multi-threaded mode to single-threaded mode or scale
996 down the LZMA2 dictionary size. This seemed illogical.
998 Now --memlimit-compress can make xz switch to single-threaded
999 mode if one thread in multi-threaded mode uses too much
1000 memory. If memory usage is still too high, then the LZMA2
1001 dictionary size can be scaled down too.
1003 The option --no-adjust was also changed so that it no longer
1004 prevents xz from scaling down the number of threads as that
1005 doesn't affect compressed output (only performance). After
1006 this commit --no-adjust only prevents adjustments that affect
1007 compressed output, that is, with --no-adjust xz won't switch
1008 from multithreaded mode to single-threaded mode and won't
1009 scale down the LZMA2 dictionary size.
1011 - Added a new option --memlimit-mt-decompress=LIMIT. This is
1012 used to limit the number of decompressor threads (possibly
1013 falling back to single-threaded mode) but it will never make
1014 xz refuse to decompress a file. This has a system-specific
1015 default value because without any limit xz could end up
1016 allocating memory for the whole compressed input file, the
1017 whole uncompressed output file, multiple thread-specific
1018 decompressor instances and so on. Basically xz could
1019 attempt to use an insane amount of memory even with fairly
1022 The new option works together with the existing option
1023 --memlimit-decompress=LIMIT. The old option sets a hard limit
1024 that must not be exceeded (xz will refuse to decompress)
1025 while the new option only restricts the number of threads.
1026 If the limit set with --memlimit-mt-decompress is greater
1027 than the limit set with --memlimit-compress, then the latter
1028 value is used also for --memlimit-mt-decompress.
1032 - Added a few more tests.
1034 - Added tests/code_coverage.sh to create a code coverage report
1039 - Automake's parallel test harness is now used to make tests
1042 - Added the CMake files to the distribution tarball. These were
1043 supposed to be in 5.2.5 already.
1045 - Added liblzma tests to the CMake build.
1047 - Windows: Fix building of liblzma.dll with the included
1048 Visual Studio project files.
1051 5.3.2alpha (2021-10-28)
1053 This release was made on short notice so that recent erofs-utils can
1054 be built with LZMA support without needing a snapshot from xz.git.
1055 Thus many pending things were not included, not even updated
1056 translations (which would need to be updated for the new --list
1059 * All fixes from 5.2.5.
1063 - When copying metadata from the source file to the destination
1064 file, don't try to set the group (GID) if it is already set
1065 correctly. This avoids a failure on OpenBSD (and possibly on
1066 a few other OSes) where files may get created so that their
1067 group doesn't belong to the user, and fchown(2) can fail even
1068 if it needs to do nothing.
1070 - The --keep option now accepts symlinks, hardlinks, and
1071 setuid, setgid, and sticky files. Previously this required
1074 - Split the long strings used in --list and --info-memory modes
1075 to make them much easier for translators.
1077 - If built with sandbox support and enabling the sandbox fails,
1078 xz will now immediately exit with exit status of 1. Previously
1079 it would only display a warning if -vv was used.
1081 - Cap --memlimit-compress to 2000 MiB on MIPS32 because on
1082 MIPS32 userspace processes are limited to 2 GiB of address
1087 - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
1088 The API is in lzma/container.h.
1090 The MicroLZMA format is a raw LZMA stream (without end marker)
1091 whose first byte (always 0x00) has been replaced with
1092 bitwise-negation of the LZMA properties (lc/lp/pb). It was
1093 created for use in EROFS but may be used in other contexts
1094 as well where it is important to avoid wasting bytes for
1095 stream headers or footers. The format is also supported by
1098 The MicroLZMA encoder API in liblzma can compress into a
1099 fixed-sized output buffer so that as much data is compressed
1100 as can be fit into the buffer while still creating a valid
1101 MicroLZMA stream. This is needed for EROFS.
1103 - Added fuzzing support.
1105 - Support Intel Control-flow Enforcement Technology (CET) in
1106 32-bit x86 assembly files.
1108 - Visual Studio: Use non-standard _MSVC_LANG to detect C++
1109 standard version in the lzma.h API header. It's used to
1110 detect when "noexcept" can be used.
1114 - Fix exit status of xzdiff/xzcmp. Exit status could be 2 when
1115 the correct value is 1.
1117 - Fix exit status of xzgrep.
1119 - Detect corrupt .bz2 files in xzgrep.
1121 - Add zstd support to xzgrep and xzdiff/xzcmp.
1123 - Fix less(1) version detection in xzless. It failed if the
1124 version number from "less -V" contained a dot.
1126 * Fix typos and technical issues in man pages.
1130 - Windows: Fix building of resource files when config.h isn't
1131 used. CMake + Visual Studio can now build liblzma.dll.
1133 - Various fixes to the CMake support. It might still need a few
1134 more fixes even for liblzma-only builds.
1137 5.3.1alpha (2018-04-29)
1139 * All fixes from 5.2.4.
1141 * Add lzma_file_info_decoder() into liblzma and use it in xz to
1142 implement the --list feature.
1144 * Capsicum sandbox support is enabled by default where available
1150 * Fixed a build system bug that prevented building liblzma as a
1151 shared library when configured with --disable-threads. This bug
1152 affected releases 5.2.6 to 5.2.11 and 5.4.0 to 5.4.2.
1154 * Include <intrin.h> for Windows intrinsic functions where they are
1155 needed. This fixed a bug that prevented building liblzma using
1156 clang-cl on Windows.
1158 * Minor update to the Croatian translation. The small change
1159 applies to a string in both 5.2 and 5.4 branches.
1164 * Removed all possible cases of null pointer + 0. It is undefined
1165 behavior in C99 and C17. This was detected by a sanitizer and had
1166 not caused any known issues.
1170 - Added a workaround for building with GCC on MicroBlaze Linux.
1171 GCC 12 on MicroBlaze doesn't support the __symver__ attribute
1172 even though __has_attribute(__symver__) returns true. The
1173 build is now done without the extra RHEL/CentOS 7 symbols
1174 that were added in XZ Utils 5.2.7. The workaround only
1175 applies to the Autotools build (not CMake).
1177 - CMake: Ensure that the C compiler language is set to C99 or
1180 - CMake changes from XZ Utils 5.4.1:
1182 * Added a workaround for a build failure with
1183 windres from GNU binutils.
1185 * Included the Windows resource files in the xz
1186 and xzdec build rules.
1191 * xz: Don't modify argv[] when parsing the --memlimit* and
1192 --block-list command line options. This fixes confusing
1193 arguments in process listing (like "ps auxf").
1195 * GNU/Linux only: Use __has_attribute(__symver__) to detect if
1196 that attribute is supported. This fixes build on Mandriva where
1197 Clang is patched to define __GNUC__ to 11 by default (instead
1198 of 4 as used by Clang upstream).
1205 - Fixed an infinite loop in LZMA encoder initialization
1206 if dict_size >= 2 GiB. (The encoder only supports up
1209 - Fixed two cases of invalid free() that can happen if
1210 a tiny allocation fails in encoder re-initialization
1211 or in lzma_filters_update(). These bugs had some
1212 similarities with the bug fixed in 5.2.7.
1214 - Fixed lzma_block_encoder() not allowing the use of
1215 LZMA_SYNC_FLUSH with lzma_code() even though it was
1216 documented to be supported. The sync-flush code in
1217 the Block encoder was already used internally via
1218 lzma_stream_encoder(), so this was just a missing flag
1219 in the lzma_block_encoder() API function.
1221 - GNU/Linux only: Don't put symbol versions into static
1222 liblzma as it breaks things in some cases (and even if
1223 it didn't break anything, symbol versions in static
1224 libraries are useless anyway). The downside of the fix
1225 is that if the configure options --with-pic or --without-pic
1226 are used then it's not possible to build both shared and
1227 static liblzma at the same time on GNU/Linux anymore;
1228 with those options --disable-static or --disable-shared
1231 * New email address for bug reports is <xz@tukaani.org> which
1232 forwards messages to Lasse Collin and Jia Tan.
1239 - If xz cannot remove an input file when it should, this
1240 is now treated as a warning (exit status 2) instead of
1241 an error (exit status 1). This matches GNU gzip and it
1242 is more logical as at that point the output file has
1243 already been successfully closed.
1245 - Fix handling of .xz files with an unsupported check type.
1246 Previously such printed a warning message but then xz
1247 behaved as if an error had occurred (didn't decompress,
1248 exit status 1). Now a warning is printed, decompression
1249 is done anyway, and exit status is 2. This used to work
1250 slightly before 5.0.0. In practice this bug matters only
1251 if xz has been built with some check types disabled. As
1252 instructed in PACKAGERS, such builds should be done in
1253 special situations only.
1255 - Fix "xz -dc --single-stream tests/files/good-0-empty.xz"
1256 which failed with "Internal error (bug)". That is,
1257 --single-stream was broken if the first .xz stream in
1258 the input file didn't contain any uncompressed data.
1260 - Fix displaying file sizes in the progress indicator when
1261 working in passthru mode and there are multiple input files.
1262 Just like "gzip -cdf", "xz -cdf" works like "cat" when the
1263 input file isn't a supported compressed file format. In
1264 this case the file size counters weren't reset between
1265 files so with multiple input files the progress indicator
1266 displayed an incorrect (too large) value.
1270 - API docs in lzma/container.h:
1271 * Update the list of decoder flags in the decoder
1273 * Explain LZMA_CONCATENATED behavior with .lzma files
1274 in lzma_auto_decoder() docs.
1276 - OpenBSD: Use HW_NCPUONLINE to detect the number of
1277 available hardware threads in lzma_physmem().
1279 - Fix use of wrong macro to detect x86 SSE2 support.
1280 __SSE2_MATH__ was used with GCC/Clang but the correct
1281 one is __SSE2__. The first one means that SSE2 is used
1282 for floating point math which is irrelevant here.
1283 The affected SSE2 code isn't used on x86-64 so this affects
1284 only 32-bit x86 builds that use -msse2 without -mfpmath=sse
1285 (there is no runtime detection for SSE2). It improves LZMA
1286 compression speed (not decompression).
1288 - Fix the build with Intel C compiler 2021 (ICC, not ICX)
1289 on Linux. It defines __GNUC__ to 10 but doesn't support
1290 the __symver__ attribute introduced in GCC 10.
1292 * Scripts: Ignore warnings from xz by using --quiet --no-warn.
1293 This is needed if the input .xz files use an unsupported
1298 - Updated Croatian and Turkish translations.
1300 - One new translations wasn't included because it needed
1301 technical fixes. It will be in upcoming 5.4.0. No new
1302 translations will be added to the 5.2.x branch anymore.
1304 - Renamed the French man page translation file from
1305 fr_FR.po to fr.po and thus also its install directory
1306 (like /usr/share/man/fr_FR -> .../fr).
1308 - Man page translations for upcoming 5.4.0 are now handled
1309 in the Translation Project.
1311 * Update doc/faq.txt a little so it's less out-of-date.
1318 - Made lzma_filters_copy() to never modify the destination
1319 array if an error occurs. lzma_stream_encoder() and
1320 lzma_stream_encoder_mt() already assumed this. Before this
1321 change, if a tiny memory allocation in lzma_filters_copy()
1322 failed it would lead to a crash (invalid free() or invalid
1323 memory reads) in the cleanup paths of these two encoder
1324 initialization functions.
1326 - Added missing integer overflow check to lzma_index_append().
1327 This affects xz --list and other applications that decode
1328 the Index field from .xz files using lzma_index_decoder().
1329 Normal decompression of .xz files doesn't call this code
1330 and thus most applications using liblzma aren't affected
1333 - Single-threaded .xz decoder (lzma_stream_decoder()): If
1334 lzma_code() returns LZMA_MEMLIMIT_ERROR it is now possible
1335 to use lzma_memlimit_set() to increase the limit and continue
1336 decoding. This was supposed to work from the beginning
1337 but there was a bug. With other decoders (.lzma or
1338 threaded .xz decoder) this already worked correctly.
1340 - Fixed accumulation of integrity check type statistics in
1341 lzma_index_cat(). This bug made lzma_index_checks() return
1342 only the type of the integrity check of the last Stream
1343 when multiple lzma_indexes were concatenated. Most
1344 applications don't use these APIs but in xz it made
1345 xz --list not list all check types from concatenated .xz
1346 files. In xz --list --verbose only the per-file "Check:"
1347 lines were affected and in xz --robot --list only the "file"
1350 - Added ABI compatibility with executables that were linked
1351 against liblzma in RHEL/CentOS 7 or other liblzma builds
1352 that had copied the problematic patch from RHEL/CentOS 7
1353 (xz-5.2.2-compat-libs.patch). For the details, see the
1354 comment at the top of src/liblzma/validate_map.sh.
1356 WARNING: This uses __symver__ attribute with GCC >= 10.
1357 In other cases the traditional __asm__(".symver ...")
1358 is used. Using link-time optimization (LTO, -flto) with
1359 GCC versions older than 10 can silently result in
1360 broken liblzma.so.5 (incorrect symbol versions)! If you
1361 want to use -flto with GCC, you must use GCC >= 10.
1362 LTO with Clang seems to work even with the traditional
1363 __asm__(".symver ...") method.
1365 * xzgrep: Fixed compatibility with old shells that break if
1366 comments inside command substitutions have apostrophes (').
1367 This problem was introduced in 5.2.6.
1371 - New #define in config.h: HAVE_SYMBOL_VERSIONS_LINUX
1373 - Windows: Fixed liblzma.dll build with Visual Studio project
1374 files. It broke in 5.2.6 due to a change that was made to
1375 improve CMake support.
1377 - Windows: Building liblzma with UNICODE defined should now
1380 - CMake files are now actually included in the release tarball.
1381 They should have been in 5.2.5 already.
1383 - Minor CMake fixes and improvements.
1385 * Added a new translation: Turkish
1392 - The --keep option now accepts symlinks, hardlinks, and
1393 setuid, setgid, and sticky files. Previously this required
1396 - When copying metadata from the source file to the destination
1397 file, don't try to set the group (GID) if it is already set
1398 correctly. This avoids a failure on OpenBSD (and possibly on
1399 a few other OSes) where files may get created so that their
1400 group doesn't belong to the user, and fchown(2) can fail even
1401 if it needs to do nothing.
1403 - Cap --memlimit-compress to 2000 MiB instead of 4020 MiB on
1404 MIPS32 because on MIPS32 userspace processes are limited
1405 to 2 GiB of address space.
1409 - Fixed a missing error-check in the threaded encoder. If a
1410 small memory allocation fails, a .xz file with an invalid
1411 Index field would be created. Decompressing such a file would
1412 produce the correct output but result in an error at the end.
1413 Thus this is a "mild" data corruption bug. Note that while
1414 a failed memory allocation can trigger the bug, it cannot
1415 cause invalid memory access.
1417 - The decoder for .lzma files now supports files that have
1418 uncompressed size stored in the header and still use the
1419 end of payload marker (end of stream marker) at the end
1420 of the LZMA stream. Such files are rare but, according to
1421 the documentation in LZMA SDK, they are valid.
1422 doc/lzma-file-format.txt was updated too.
1424 - Improved 32-bit x86 assembly files:
1425 * Support Intel Control-flow Enforcement Technology (CET)
1426 * Use non-executable stack on FreeBSD.
1428 - Visual Studio: Use non-standard _MSVC_LANG to detect C++
1429 standard version in the lzma.h API header. It's used to
1430 detect when "noexcept" can be used.
1434 - Fixed arbitrary command injection via a malicious filename
1435 (CVE-2022-1271, ZDI-CAN-16587). A standalone patch for
1436 this was released to the public on 2022-04-07. A slight
1437 robustness improvement has been made since then and, if
1438 using GNU or *BSD grep, a new faster method is now used
1439 that doesn't use the old sed-based construct at all. This
1440 also fixes bad output with GNU grep >= 3.5 (2020-09-27)
1441 when xzgrepping binary files.
1443 This vulnerability was discovered by:
1444 cleemy desu wayo working with Trend Micro Zero Day Initiative
1446 - Fixed detection of corrupt .bz2 files.
1448 - Improved error handling to fix exit status in some situations
1449 and to fix handling of signals: in some situations a signal
1450 didn't make xzgrep exit when it clearly should have. It's
1451 possible that the signal handling still isn't quite perfect
1452 but hopefully it's good enough.
1454 - Documented exit statuses on the man page.
1456 - xzegrep and xzfgrep now use "grep -E" and "grep -F" instead
1457 of the deprecated egrep and fgrep commands.
1459 - Fixed parsing of the options -E, -F, -G, -P, and -X. The
1460 problem occurred when multiple options were specified in
1461 a single argument, for example,
1463 echo foo | xzgrep -Fe foo
1465 treated foo as a filename because -Fe wasn't correctly
1468 - Added zstd support.
1472 - Fixed wrong exit status. Exit status could be 2 when the
1475 - Documented on the man page that exit status of 2 is used
1476 for decompression errors.
1478 - Added zstd support.
1482 - Fix less(1) version detection. It failed if the version number
1483 from "less -V" contained a dot.
1487 - Added new translations: Catalan, Croatian, Esperanto,
1488 Korean, Portuguese, Romanian, Serbian, Spanish, Swedish,
1491 - Updated the Brazilian Portuguese translation.
1493 - Added French man page translation. This and the existing
1494 German translation aren't complete anymore because the
1495 English man pages got a few updates and the translators
1496 weren't reached so that they could update their work.
1500 - Windows: Fix building of resource files when config.h isn't
1501 used. CMake + Visual Studio can now build liblzma.dll.
1503 - Various fixes to the CMake support. Building static or shared
1504 liblzma should work fine in most cases. In contrast, building
1505 the command line tools with CMake is still clearly incomplete
1506 and experimental and should be used for testing only.
1513 - Fixed several C99/C11 conformance bugs. Now the code is clean
1514 under gcc/clang -fsanitize=undefined. Some of these changes
1515 might have a negative effect on performance with old GCC
1516 versions or compilers other than GCC and Clang. The configure
1517 option --enable-unsafe-type-punning can be used to (mostly)
1518 restore the old behavior but it shouldn't normally be used.
1520 - Improved API documentation of lzma_properties_decode().
1522 - Added a very minor encoder speed optimization.
1526 - Fixed a crash in "xz -dcfv not_an_xz_file". All four options
1527 were required to trigger it. The crash occurred in the
1528 progress indicator code when xz was in passthru mode where
1529 xz works like "cat".
1531 - Fixed an integer overflow with 32-bit off_t. It could happen
1532 when decompressing a file that has a long run of zero bytes
1533 which xz would try to write as a sparse file. Since the build
1534 system enables large file support by default, off_t is
1535 normally 64-bit even on 32-bit systems.
1537 - Fixes for --flush-timeout:
1538 * Fix semi-busy-waiting.
1539 * Avoid unneeded flushes when no new input has arrived
1540 since the previous flush was completed.
1542 - Added a special case for 32-bit xz: If --memlimit-compress is
1543 used to specify a limit that exceeds 4020 MiB, the limit will
1544 be set to 4020 MiB. The values "0" and "max" aren't affected
1545 by this and neither is decompression. This hack can be
1546 helpful when a 32-bit xz has access to 4 GiB address space
1547 but the specified memlimit exceeds 4 GiB. This can happen
1548 e.g. with some scripts.
1550 - Capsicum sandbox is now enabled by default where available
1551 (FreeBSD >= 10). The sandbox debug messages (xz -vv) were
1552 removed since they seemed to be more annoying than useful.
1554 - DOS build now requires DJGPP 2.05 instead of 2.04beta.
1555 A workaround for a locale problem with DJGPP 2.05 was added.
1557 * xzgrep and other scripts:
1559 - Added a configure option --enable-path-for-scripts=PREFIX.
1560 It is disabled by default except on Solaris where the default
1561 is /usr/xpg4/bin. See INSTALL for details.
1563 - Added a workaround for a POSIX shell detection problem on
1568 - Added preliminary build instructions for z/OS. See INSTALL
1571 - Experimental CMake support was added. It should work to build
1572 static liblzma on a few operating systems. It may or may not
1573 work to build shared liblzma. On some platforms it can build
1574 xz and xzdec too but those are only for testing. See the
1575 comment in the beginning of CMakeLists.txt for details.
1577 - Visual Studio project files were updated.
1578 WindowsTargetPlatformVersion was removed from VS2017 files
1579 and set to "10.0" in the added VS2019 files. In the future
1580 the VS project files will be removed when CMake support is
1583 - New #defines in config.h: HAVE___BUILTIN_ASSUME_ALIGNED,
1584 HAVE___BUILTIN_BSWAPXX, and TUKLIB_USE_UNSAFE_TYPE_PUNNING.
1586 - autogen.sh has a new optional dependency on po4a and a new
1587 option --no-po4a to skip that step. This matters only if one
1588 wants to remake the build files. po4a is used to update the
1589 translated man pages but as long as the man pages haven't
1590 been modified, there's nothing to update and one can use
1591 --no-po4a to avoid the dependency on po4a.
1595 - XZ Utils translations are now handled by the Translation
1596 Project: https://translationproject.org/domain/xz.html
1598 - All man pages are now included in German too.
1600 - New xz translations: Brazilian Portuguese, Finnish,
1601 Hungarian, Chinese (simplified), Chinese (traditional),
1602 and Danish (partial translation)
1604 - Updated xz translations: French, German, Italian, and Polish
1606 - Unfortunately a few new xz translations weren't included due
1607 to technical problems like too long lines in --help output or
1608 misaligned column headings in tables. In the future, many of
1609 these strings will be split and e.g. the table column
1610 alignment will be handled in software. This should make the
1611 strings easier to translate.
1618 - Allow 0 as memory usage limit instead of returning
1619 LZMA_PROG_ERROR. Now 0 is treated as if 1 byte was specified,
1620 which effectively is the same as 0.
1622 - Use "noexcept" keyword instead of "throw()" in the public
1623 headers when a C++11 (or newer standard) compiler is used.
1625 - Added a portability fix for recent Intel C Compilers.
1627 - Microsoft Visual Studio build files have been moved under
1628 windows/vs2013 and windows/vs2017.
1632 - Fix "xz --list --robot missing_or_bad_file.xz" which would
1633 try to print an uninitialized string and thus produce garbage
1634 output. Since the exit status is non-zero, most uses of such
1635 a command won't try to interpret the garbage output.
1637 - "xz --list foo.xz" could print "Internal error (bug)" in a
1638 corner case where a specific memory usage limit had been set.
1645 - Always close a file before trying to delete it to avoid
1646 problems on some operating system and file system combinations.
1648 - Fixed copying of file timestamps on Windows.
1650 - Added experimental (disabled by default) sandbox support using
1651 Capsicum (FreeBSD >= 10). See --enable-sandbox in INSTALL.
1653 * C99/C11 conformance fixes to liblzma. The issues affected at least
1654 some builds using link-time optimizations.
1656 * Fixed bugs in the rarely-used function lzma_index_dup().
1658 * Use of external SHA-256 code is now disabled by default.
1659 It can still be enabled by passing --enable-external-sha256
1660 to configure. The reasons to disable it by default (see INSTALL
1663 - Some OS-specific SHA-256 implementations conflict with
1664 OpenSSL and cause problems in programs that link against both
1665 liblzma and libcrypto. At least FreeBSD 10 and MINIX 3.3.0
1668 - The internal SHA-256 is faster than the SHA-256 code in
1669 some operating systems.
1671 * Changed CPU core count detection to use sched_getaffinity() on
1672 GNU/Linux and GNU/kFreeBSD.
1674 * Fixes to the build-system and xz to make xz buildable even when
1675 encoders, decoders, or threading have been disabled from libilzma
1676 using configure options. These fixes added two new #defines to
1677 config.h: HAVE_ENCODERS and HAVE_DECODERS.
1682 * Fixed bugs in QNX-specific code.
1684 * Omitted the use of pipe2() even if it is available to avoid
1685 portability issues with some old Linux and glibc combinations.
1687 * Updated German translation.
1689 * Added project files to build static and shared liblzma (not the
1690 whole XZ Utils) with Visual Studio 2013 update 2 or later.
1692 * Documented that threaded decompression hasn't been implemented
1693 yet. A 5.2.0 NEWS entry describing multi-threading support had
1694 incorrectly said "decompression" when it should have said
1700 * Fixed a compression-ratio regression in fast mode of LZMA1 and
1701 LZMA2. The bug is present in 5.1.4beta and 5.2.0 releases.
1703 * Fixed a portability problem in xz that affected at least OpenBSD.
1705 * Fixed xzdiff to be compatible with FreeBSD's mktemp which differs
1706 from most other mktemp implementations.
1708 * Changed CPU core count detection to use cpuset_getaffinity() on
1716 * All fixes from 5.0.8
1718 * liblzma: Fixed lzma_stream_encoder_mt_memusage() when a preset
1721 * xzdiff: If mktemp isn't installed, mkdir will be used as
1722 a fallback to create a temporary directory. Installing mktemp
1723 is still recommended.
1725 * Updated French, German, Italian, Polish, and Vietnamese
1728 Summary of fixes and new features added in the 5.1.x development
1733 - Added support for multi-threaded compression. See the
1734 lzma_mt structure, lzma_stream_encoder_mt(), and
1735 lzma_stream_encoder_mt_memusage() in <lzma/container.h>,
1736 lzma_get_progress() in <lzma/base.h>, and lzma_cputhreads()
1737 in <lzma/hardware.h> for details.
1739 - Made the uses of lzma_allocator const correct.
1741 - Added lzma_block_uncomp_encode() to create uncompressed
1742 .xz Blocks using LZMA2 uncompressed chunks.
1744 - Added support for LZMA_IGNORE_CHECK.
1746 - A few speed optimizations were made.
1748 - Added support for symbol versioning. It is enabled by default
1749 on GNU/Linux, other GNU-based systems, and FreeBSD.
1751 - liblzma (not the whole XZ Utils) should now be buildable
1752 with MSVC 2013 update 2 or later using windows/config.h.
1756 - Fixed a race condition in the signal handling. It was
1757 possible that e.g. the first SIGINT didn't make xz exit
1758 if reading or writing blocked and one had bad luck. The fix
1759 is non-trivial, so as of writing it is unknown if it will be
1760 backported to the v5.0 branch.
1762 - Multi-threaded compression can be enabled with the
1763 --threads (-T) option.
1764 [Fixed: This originally said "decompression".]
1766 - New command line options in xz: --single-stream,
1767 --block-size=SIZE, --block-list=SIZES,
1768 --flush-timeout=TIMEOUT, and --ignore-check.
1770 - xz -lvv now shows the minimum xz version that is required to
1771 decompress the file. Currently it is 5.0.0 for all supported
1772 .xz files except files with empty LZMA2 streams require 5.0.2.
1774 * xzdiff and xzgrep now support .lzo files if lzop is installed.
1775 The .tzo suffix is also recognized as a shorthand for .tar.lzo.
1778 5.1.4beta (2014-09-14)
1780 * All fixes from 5.0.6
1782 * liblzma: Fixed the use of presets in threaded encoder
1785 * xz --block-list and --block-size can now be used together
1786 in single-threaded mode. Previously the combination only
1787 worked in multi-threaded mode.
1789 * Added support for LZMA_IGNORE_CHECK to liblzma and made it
1790 available in xz as --ignore-check.
1792 * liblzma speed optimizations:
1794 - Initialization of a new LZMA1 or LZMA2 encoder has been
1795 optimized. (The speed of reinitializing an already-allocated
1796 encoder isn't affected.) This helps when compressing many
1797 small buffers with lzma_stream_buffer_encode() and other
1798 similar situations where an already-allocated encoder state
1799 isn't reused. This speed-up is visible in xz too if one
1800 compresses many small files one at a time instead running xz
1801 once and giving all files as command-line arguments.
1803 - Buffer comparisons are now much faster when unaligned access
1804 is allowed (configured with --enable-unaligned-access). This
1805 speeds up encoding significantly. There is arch-specific code
1806 for 32-bit and 64-bit x86 (32-bit needs SSE2 for the best
1807 results and there's no run-time CPU detection for now).
1808 For other archs there is only generic code which probably
1809 isn't as optimal as arch-specific solutions could be.
1811 - A few speed optimizations were made to the SHA-256 code.
1812 (Note that the builtin SHA-256 code isn't used on all
1815 * liblzma can now be built with MSVC 2013 update 2 or later
1816 using windows/config.h.
1818 * Vietnamese translation was added.
1821 5.1.3alpha (2013-10-26)
1823 * All fixes from 5.0.5
1827 - Fixed a deadlock in the threaded encoder.
1829 - Made the uses of lzma_allocator const correct.
1831 - Added lzma_block_uncomp_encode() to create uncompressed
1832 .xz Blocks using LZMA2 uncompressed chunks.
1834 - Added support for native threads on Windows and the ability
1835 to detect the number of CPU cores.
1839 - Fixed a race condition in the signal handling. It was
1840 possible that e.g. the first SIGINT didn't make xz exit
1841 if reading or writing blocked and one had bad luck. The fix
1842 is non-trivial, so as of writing it is unknown if it will be
1843 backported to the v5.0 branch.
1845 - Made the progress indicator work correctly in threaded mode.
1847 - Threaded encoder now works together with --block-list=SIZES.
1849 - Added preliminary support for --flush-timeout=TIMEOUT.
1850 It can be useful for (somewhat) real-time streaming. For
1851 now the decompression side has to be done with something
1852 else than the xz tool due to how xz does buffering, but this
1856 5.1.2alpha (2012-07-04)
1858 * All fixes from 5.0.3 and 5.0.4
1862 - Fixed a deadlock and an invalid free() in the threaded encoder.
1864 - Added support for symbol versioning. It is enabled by default
1865 on GNU/Linux, other GNU-based systems, and FreeBSD.
1867 - Use SHA-256 implementation from the operating system if one is
1868 available in libc, libmd, or libutil. liblzma won't use e.g.
1869 OpenSSL or libgcrypt to avoid introducing new dependencies.
1871 - Fixed liblzma.pc for static linking.
1873 - Fixed a few portability bugs.
1875 * xz --decompress --single-stream now fixes the input position after
1876 successful decompression. Now the following works:
1878 echo foo | xz > foo.xz
1879 echo bar | xz >> foo.xz
1880 ( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
1882 Note that it doesn't work if the input is not seekable
1883 or if there is Stream Padding between the concatenated
1886 * xz -lvv now shows the minimum xz version that is required to
1887 decompress the file. Currently it is 5.0.0 for all supported .xz
1888 files except files with empty LZMA2 streams require 5.0.2.
1890 * Added an *incomplete* implementation of --block-list=SIZES to xz.
1891 It only works correctly in single-threaded mode and when
1892 --block-size isn't used at the same time. --block-list allows
1893 specifying the sizes of Blocks which can be useful e.g. when
1894 creating files for random-access reading.
1897 5.1.1alpha (2011-04-12)
1899 * All fixes from 5.0.2
1901 * liblzma fixes that will also be included in 5.0.3:
1903 - A memory leak was fixed.
1905 - lzma_stream_buffer_encode() no longer creates an empty .xz
1906 Block if encoding an empty buffer. Such an empty Block with
1907 LZMA2 data would trigger a bug in 5.0.1 and older (see the
1908 first bullet point in 5.0.2 notes). When releasing 5.0.2,
1909 I thought that no encoder creates this kind of files but
1912 - Validate function arguments better in a few functions. Most
1913 importantly, specifying an unsupported integrity check to
1914 lzma_stream_buffer_encode() no longer creates a corrupt .xz
1915 file. Probably no application tries to do that, so this
1916 shouldn't be a big problem in practice.
1918 - Document that lzma_block_buffer_encode(),
1919 lzma_easy_buffer_encode(), lzma_stream_encoder(), and
1920 lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
1922 - The return values of the _memusage() functions are now
1925 * Support for multithreaded compression was added using the simplest
1926 method, which splits the input data into blocks and compresses
1927 them independently. Other methods will be added in the future.
1928 The current method has room for improvement, e.g. it is possible
1929 to reduce the memory usage.
1931 * Added the options --single-stream and --block-size=SIZE to xz.
1933 * xzdiff and xzgrep now support .lzo files if lzop is installed.
1934 The .tzo suffix is also recognized as a shorthand for .tar.lzo.
1936 * Support for short 8.3 filenames under DOS was added to xz. It is
1937 experimental and may change before it gets into a stable release.
1942 * Fixed an old bug in xzgrep that affected OpenBSD and probably
1943 a few other operating systems too.
1945 * Updated French and German translations.
1947 * Added support for detecting the amount of RAM on AmigaOS/AROS.
1949 * Minor build system updates.
1954 * Fix regressions introduced in 5.0.6:
1956 - Fix building with non-GNU make.
1958 - Fix invalid Libs.private value in liblzma.pc which broke
1959 static linking against liblzma if the linker flags were
1960 taken from pkg-config.
1965 * xzgrep now exits with status 0 if at least one file matched.
1967 * A few minor portability and build system fixes
1972 * lzmadec and liblzma's lzma_alone_decoder(): Support decompressing
1973 .lzma files that have less common settings in the headers
1974 (dictionary size other than 2^n or 2^n + 2^(n-1), or uncompressed
1975 size greater than 256 GiB). The limitations existed to avoid false
1976 positives when detecting .lzma files. The lc + lp <= 4 limitation
1977 still remains since liblzma's LZMA decoder has that limitation.
1979 NOTE: xz's .lzma support or liblzma's lzma_auto_decoder() are NOT
1980 affected by this change. They still consider uncommon .lzma headers
1981 as not being in the .lzma format. Changing this would give way too
1982 many false positives.
1986 - Interaction of preset and custom filter chain options was
1987 made less illogical. This affects only certain less typical
1988 uses cases so few people are expected to notice this change.
1990 Now when a custom filter chain option (e.g. --lzma2) is
1991 specified, all preset options (-0 ... -9, -e) earlier are on
1992 the command line are completely forgotten. Similarly, when
1993 a preset option is specified, all custom filter chain options
1994 earlier on the command line are completely forgotten.
1996 Example 1: "xz -9 --lzma2=preset=5 -e" is equivalent to "xz -e"
1997 which is equivalent to "xz -6e". Earlier -e didn't put xz back
1998 into preset mode and thus the example command was equivalent
1999 to "xz --lzma2=preset=5".
2001 Example 2: "xz -9e --lzma2=preset=5 -7" is equivalent to
2002 "xz -7". Earlier a custom filter chain option didn't make
2003 xz forget the -e option so the example was equivalent to
2006 - Fixes and improvements to error handling.
2008 - Various fixes to the man page.
2010 * xzless: Fixed to work with "less" versions 448 and later.
2012 * xzgrep: Made -h an alias for --no-filename.
2014 * Include the previously missing debug/translation.bash which can
2015 be useful for translators.
2017 * Include a build script for Mac OS X. This has been in the Git
2018 repository since 2010 but due to a mistake in Makefile.am the
2019 script hasn't been included in a release tarball before.
2026 - Fix lzma_index_init(). It could crash if memory allocation
2029 - Fix the possibility of an incorrect LZMA_BUF_ERROR when a BCJ
2030 filter is used and the application only provides exactly as
2031 much output space as is the uncompressed size of the file.
2033 - Fix a bug in doc/examples_old/xz_pipe_decompress.c. It didn't
2034 check if the last call to lzma_code() really returned
2035 LZMA_STREAM_END, which made the program think that truncated
2038 - New example programs in doc/examples (old programs are now in
2039 doc/examples_old). These have more comments and more detailed
2042 * Fix "xz -lvv foo.xz". It could crash on some corrupted files.
2044 * Fix output of "xz --robot -lv" and "xz --robot -lvv" which
2045 incorrectly printed the filename also in the "foo (x/x)" format.
2047 * Fix exit status of "xzdiff foo.xz bar.xz".
2049 * Fix exit status of "xzgrep foo binary_file".
2051 * Fix portability to EBCDIC systems.
2053 * Fix a configure issue on AIX with the XL C compiler. See INSTALL
2056 * Update French, German, Italian, and Polish translations.
2063 - A memory leak was fixed.
2065 - lzma_stream_buffer_encode() no longer creates an empty .xz
2066 Block if encoding an empty buffer. Such an empty Block with
2067 LZMA2 data would trigger a bug in 5.0.1 and older (see the
2068 first bullet point in 5.0.2 notes). When releasing 5.0.2,
2069 I thought that no encoder creates this kind of files but
2072 - Validate function arguments better in a few functions. Most
2073 importantly, specifying an unsupported integrity check to
2074 lzma_stream_buffer_encode() no longer creates a corrupt .xz
2075 file. Probably no application tries to do that, so this
2076 shouldn't be a big problem in practice.
2078 - Document that lzma_block_buffer_encode(),
2079 lzma_easy_buffer_encode(), lzma_stream_encoder(), and
2080 lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
2082 - The return values of the _memusage() functions are now
2085 * Fix command name detection in xzgrep. xzegrep and xzfgrep now
2086 correctly use egrep and fgrep instead of grep.
2088 * French translation was added.
2093 * LZMA2 decompressor now correctly accepts LZMA2 streams with no
2094 uncompressed data. Previously it considered them corrupt. The
2095 bug can affect applications that use raw LZMA2 streams. It is
2096 very unlikely to affect .xz files because no compressor creates
2097 .xz files with empty LZMA2 streams. (Empty .xz files are a
2098 different thing than empty LZMA2 streams.)
2100 * "xz --suffix=.foo filename.foo" now refuses to compress the
2101 file due to it already having the suffix .foo. It was already
2102 documented on the man page, but the code lacked the test.
2104 * "xzgrep -l foo bar.xz" works now.
2106 * Polish translation was added.
2111 * xz --force now (de)compresses files that have setuid, setgid,
2112 or sticky bit set and files that have multiple hard links.
2113 The man page had it documented this way already, but the code
2116 * gzip and bzip2 support in xzdiff was fixed.
2120 * Minor fix to Czech translation
2125 Only the most important changes compared to 4.999.9beta are listed
2126 here. One change is especially important:
2128 * The memory usage limit is now disabled by default. Some scripts
2129 written before this change may have used --memory=max on xz command
2130 line or in XZ_OPT. THESE USES OF --memory=max SHOULD BE REMOVED
2131 NOW, because they interfere with user's ability to set the memory
2132 usage limit himself. If user-specified limit causes problems to
2133 your script, blame the user.
2135 Other significant changes:
2137 * Added support for XZ_DEFAULTS environment variable. This variable
2138 allows users to set default options for xz, e.g. default memory
2139 usage limit or default compression level. Scripts that use xz
2140 must never set or unset XZ_DEFAULTS. Scripts should use XZ_OPT
2141 instead if they need a way to pass options to xz via an
2142 environment variable.
2144 * The compression settings associated with the preset levels
2145 -0 ... -9 have been changed. --extreme was changed a little too.
2146 It is now less likely to make compression worse, but with some
2147 files the new --extreme may compress slightly worse than the old
2150 * If a preset level (-0 ... -9) is specified after a custom filter
2151 chain options have been used (e.g. --lzma2), the custom filter
2152 chain will be forgotten. Earlier the preset options were
2153 completely ignored after custom filter chain options had been
2156 * xz will create sparse files when decompressing if the uncompressed
2157 data contains long sequences of binary zeros. This is done even
2158 when writing to standard output that is connected to a regular
2159 file and certain additional conditions are met to make it safe.
2161 * Support for "xz --list" was added. Combine with --verbose or
2162 --verbose --verbose (-vv) for detailed output.
2164 * I had hoped that liblzma API would have been stable after
2165 4.999.9beta, but there have been a couple of changes in the
2166 advanced features, which don't affect most applications:
2168 - Index handling code was revised. If you were using the old
2169 API, you will get a compiler error (so it's easy to notice).
2171 - A subtle but important change was made to the Block handling
2172 API. lzma_block.version has to be initialized even for
2173 lzma_block_header_decode(). Code that doesn't do it will work
2174 for now, but might break in the future, which makes this API
2175 change easy to miss.
2177 * The major soname has been bumped to 5.0.0. liblzma API and ABI
2178 are now stable, so the need to recompile programs linking against
2179 liblzma shouldn't arise soon.