7 * Remove the backdoor (CVE-2024-3094).
9 * Not changed: Memory sanitizer (MSAN) has a false positive
10 in the CRC CLMUL code which also makes OSS Fuzz unhappy.
11 Valgrind is smarter and doesn't complain.
13 A revision to the CLMUL code is coming anyway and this issue
14 will be cleaned up as part of it. It won't be backported to
15 5.6.x or 5.4.x because the old code isn't wrong. There is
16 no reason to risk introducing regressions in old branches
17 just to silence a false positive.
21 - lzma_index_decoder() and lzma_index_buffer_decode(): Fix
22 a missing output pointer initialization (*i = NULL) if the
23 functions are called with invalid arguments. The API docs
24 say that such an initialization is always done. In practice
25 this matters very little because the problem can only occur
26 if the calling application has a bug and these functions
27 return LZMA_PROG_ERROR.
29 - lzma_str_to_filters(): Fix a missing output pointer
30 initialization (*error_pos = 0). This is very similar
33 - Fix C standard conformance with function pointer types.
35 - Remove GNU indirect function (IFUNC) support. This is *NOT*
36 done for security reasons even though the backdoor relied on
37 this code. The performance benefits of IFUNC are too tiny in
38 this project to make the extra complexity worth it.
40 - FreeBSD on ARM64: Add error checking to CRC32 instruction
43 - Fix building with NVIDIA HPC SDK.
47 - Fix a C standard conformance issue in --block-list parsing
48 (arithmetic on a null pointer).
50 - Fix a warning from GNU groff when processing the man page:
51 "warning: cannot select font 'CW'"
53 * xzdec: Add support for Linux Landlock ABI version 4. xz already
54 had the v3-to-v4 change but it had been forgotten from xzdec.
56 * Autotools-based build system (configure):
58 - Symbol versioning variant can now be overridden with
59 --enable-symbol-versions. Documentation in INSTALL was
62 - Add new configure option --enable-doxygen to enable
63 generation and installation of the liblzma API documentation
64 using Doxygen. Documentation in INSTALL and PACKAGERS was
69 - Fix detection of Linux Landlock support. The detection code
70 in CMakeLists.txt had been sabotaged.
72 - Disable symbol versioning on non-glibc Linux to match what
73 the Autotools build does. For example, symbol versioning
74 isn't enabled with musl.
76 - Symbol versioning variant can now be overridden by setting
77 SYMBOL_VERSIONING to "OFF", "generic", or "linux".
79 - Add support for all tests in typical build configurations.
80 Now the only difference to the tests coverage to Autotools
81 is that CMake-based build will skip more tests if features
82 are disabled. Such builds are only for special cases like
85 - Separate the CMake code for the tests into tests/tests.cmake.
86 It is used conditionally, thus it is possible to
90 and the CMake-based build will still work normally except
91 that no tests are then available.
93 - Add a option ENABLE_DOXYGEN to enable generation and
94 installation of the liblzma API documentation using Doxygen.
98 - Omit the Doxygen-generated liblzma API documentation from the
99 package. Instead, the generation and installation of the API
100 docs can be enabled with a configure or CMake option if
101 Doxygen is available.
103 - Remove the XZ logo which was used in the API documentation.
104 The logo has been retired and isn't used by the project
105 anymore. However, it's OK to use it in contexts that refer
106 to the backdoor incident.
108 - Remove the PDF versions of the man pages from the source
109 package. These existed primarily for users of operating
110 systems which don't come with tools to render man page
111 source files. The plain text versions are still included
112 in doc/man/txt. PDF files can still be generated to doc/man,
113 if the required tools are available, using "make pdf" after
116 - Update home page URLs back to their old locations on
119 - Update maintainer info.
123 - In tests/files/README, explain how to recreate the ARM64
126 - Remove two tests that used tiny x86 and SPARC object files
127 as the input files. The matching .c file was included but
128 the object files aren't easy to reproduce. The test cases
129 weren't great anyway; they were from the early days (2009)
130 of the project when the test suite had very few tests.
132 - Improve a few tests.
137 IMPORTANT: This fixed bugs in the backdoor (CVE-2024-3094) (someone
138 had forgot to run Valgrind).
140 * liblzma: Fixed two bugs relating to GNU indirect function (IFUNC)
141 with GCC. The more serious bug caused a program linked with
142 liblzma to crash on start up if the flag -fprofile-generate was
143 used to build liblzma. The second bug caused liblzma to falsely
144 report an invalid write to Valgrind when loading liblzma.
146 * xz: Changed the messages for thread reduction due to memory
147 constraints to only appear under the highest verbosity level.
151 - Fixed a build issue when the header file <linux/landlock.h>
152 was present on the system but the Landlock system calls were
153 not defined in <sys/syscall.h>.
155 - The CMake build now warns and disables NLS if both gettext
156 tools and pre-created .gmo files are missing. Previously,
157 this caused the CMake build to fail.
159 * Minor improvements to man pages.
161 * Minor improvements to tests.
166 IMPORTANT: This added a backdoor (CVE-2024-3094). It's enabled only
167 in the release tarballs.
169 This bumps the minor version of liblzma because new features were
170 added. The API and ABI are still backward compatible with liblzma
171 5.4.x and 5.2.x and 5.0.x.
173 NOTE: As described in the NEWS for 5.5.2beta, the core components
174 are now under the BSD Zero Clause License (0BSD).
180 - Disabled the branchless C variant in the LZMA decoder based
181 on the benchmark results from the community.
183 - Disabled x86-64 inline assembly on x32 to fix the build.
185 * Sandboxing support in xz:
187 - Landlock is now used even when xz needs to create files.
188 In this case the sandbox has to be more permissive than
189 when no files need to be created. A similar thing was
190 already in use with pledge(2) since 5.3.4alpha.
192 - Landlock and pledge(2) are now stricter when reading from
193 more than one input file and only writing to standard output.
195 - Added support for Landlock ABI version 4.
199 - Default to -O2 instead of -O3 with CMAKE_BUILD_TYPE=Release.
200 -O3 is not useful for speed and makes the code larger.
202 - Now builds lzmainfo and lzmadec.
204 - xzdiff, xzgrep, xzless, xzmore, and their symlinks are now
205 installed. The scripts are also tested during "make test".
207 - Added translation support for xz, lzmainfo, and the
210 - Applied the symbol versioning workaround for MicroBlaze that
211 is used in the Autotools build.
213 - The general XZ Utils and liblzma API documentation is now
216 - The CMake component names were changed a little and several
217 were added. liblzma_Runtime and liblzma_Development are
220 - Minimum required CMake version is now 3.14. However,
221 translation support is disabled with CMake versions
224 - The CMake-based build is now close to feature parity with the
225 Autotools-based build. Most importantly a few tests aren't
226 run yet. Testing the CMake-based build on different operating
227 systems would be welcome now. See the comment at the top of
230 * Fixed a bug in the Autotools feature test for ARM64 CRC32
231 instruction support for old versions of Clang. This did not
232 affect the CMake build.
236 - The build instructions in INSTALL and windows/INSTALL*.txt
237 were revised completely.
239 - windows/build-with-cmake.bat along with the instructions
240 in windows/INSTALL-MinGW-w64_with_CMake.txt should make
241 it very easy to build liblzma.dll and xz.exe on Windows
242 using CMake and MinGW-w64 with either GCC or Clang/LLVM.
244 - windows/build.bash was updated. It now works on MSYS2 and
245 on GNU/Linux (cross-compiling) to create a .zip and .7z
246 package for 32-bit and 64-bit x86 using GCC + MinGW-w64.
248 * The TODO file is no longer installed as part of the
249 documentation. The file is out of date and does not reflect
250 the actual tasks that will be completed in the future.
254 - Translated lzmainfo man pages are now installed. These
255 had been forgotten in earlier versions.
257 - Updated Croatian, Esperanto, German, Hungarian, Korean,
258 Polish, Romanian, Spanish, Swedish, Vietnamese, and Ukrainian
261 - Updated German, Korean, Romanian, and Ukrainian man page
266 Summary of new features added in the 5.5.x development releases:
270 - LZMA decoder: Speed optimizations to the C code and
271 added GCC & Clang compatible inline assembly for x86-64.
273 - Added lzma_mt_block_size() to recommend a Block size for
274 multithreaded encoding.
276 - Added CLMUL-based CRC32 on x86-64 and E2K with runtime
277 processor detection. Similar to CRC64, on 32-bit x86 it
278 isn't available unless --disable-assembler is used.
280 - Optimized the CRC32 calculation on ARM64 platforms using the
281 CRC32 instructions. Runtime detection for the instruction is
282 used on GNU/Linux, FreeBSD, Windows, and macOS. If the
283 compiler flags indicate unconditional CRC32 instruction
284 support (+crc) then the generic version is not built.
286 - Added definitions of mask values like
287 LZMA_INDEX_CHECK_MASK_CRC32 to <lzma/index.h>.
291 - Multithreaded mode is now the default. This improves
292 compression speed and creates .xz files that can be
293 decompressed in multithreaded mode. The downsides are
294 increased memory usage and slightly worse compression ratio.
296 - Added a new command line option --filters to set the filter
297 chain using the liblzma filter string syntax.
299 - Added new command line options --filters1 ... --filters9 to
300 set additional filter chains using the liblzma filter string
301 syntax. The --block-list option now allows specifying filter
302 chains that were set using these new options.
304 - Ported the command line tools to Windows MSVC.
305 Visual Studio 2015 or later is required.
307 * Added lz4 support to xzdiff/xzcmp and xzgrep.
310 5.5.2beta (2024-02-14)
312 * Licensing change: The core components are now under the
313 BSD Zero Clause License (0BSD). In XZ Utils 5.4.6 and older
314 and 5.5.1alpha these components are in the public domain and
315 obviously remain so; the change affects the new releases only.
317 0BSD is an extremely permissive license which doesn't require
318 retaining or reproducing copyright or license notices when
319 distributing the code, thus in practice there is extremely
320 little difference to public domain.
324 - Significant speed optimizations to the LZMA decoder were
325 made. There are now three variants that can be chosen at
328 * Basic C version: This is a few percent faster than
329 5.4.x due to some new optimizations.
331 * Branchless C: This is currently the default on platforms
332 for which there is no assembly code. This should be a few
333 percent faster than the basic C version.
335 * x86-64 inline assembly. This works with GCC and Clang.
337 The default choice can currently be overridden by setting
338 LZMA_RANGE_DECODER_CONFIG in CPPFLAGS: 0 means the basic
339 version and 3 means that branchless C version.
341 - Optimized the CRC32 calculation on ARM64 platforms using the
342 CRC32 instructions. The instructions are optional in ARMv8.0
343 and are required in ARMv8.1 and later. Runtime detection for
344 the instruction is used on GNU/Linux, FreeBSD, Windows, and
345 macOS. If the compiler flags indicate unconditional CRC32
346 instruction support (+crc) then the generic version is not
349 * Added lz4 support to xzdiff/xzcmp and xzgrep.
351 * Man pages of xzdiff/xzcmp, xzgrep, and xzmore were rewritten
352 to simplify licensing of the man page translations.
356 - Updated Chinese (simplified), German, Korean, Polish,
357 Romanian, Spanish, Swedish, and Ukrainian translations.
359 - Updated German, Korean, Romanian, and Ukrainian man page
362 * Small improvements to the tests.
364 * Added doc/examples/11_file_info.c. It was added to the Git
365 repository in 2017 but forgotten to be added into distribution
368 * Removed doc/examples_old. These were from 2012.
370 * Removed the macos/build.sh script. It had not been updated
374 5.5.1alpha (2024-01-26)
376 * Added a new filter for RISC-V binaries. The filter can be used
377 for 32-bit and 64-bit binaries with either little or big
378 endianness. In liblzma, the Filter ID is LZMA_FILTER_RISCV (0x0B)
379 and the xz option is --riscv. liblzma filter string syntax
380 recognizes this filter as "riscv".
384 - Added lzma_mt_block_size() to recommend a Block size for
385 multithreaded encoding
387 - Added CLMUL-based CRC32 on x86-64 and E2K with runtime
388 processor detection. Similar to CRC64, on 32-bit x86 it
389 isn't available unless --disable-assembler is used.
391 - Implemented GNU indirect function (IFUNC) as a runtime
392 function dispatching method for CRC32 and CRC64 fast
393 implementations on x86. Only GNU/Linux (glibc) and FreeBSD
394 builds will use IFUNC, unless --enable-ifunc is specified to
397 - Added definitions of mask values like
398 LZMA_INDEX_CHECK_MASK_CRC32 to <lzma/index.h>.
400 - The XZ logo is now included in the Doxygen generated
401 documentation. It is licensed under Creative Commons
402 Attribution-ShareAlike 4.0.
406 - Multithreaded mode is now the default. This improves
407 compression speed and creates .xz files that can be
408 decompressed multithreaded at the cost of increased memory
409 usage and slightly worse compression ratio.
411 - Added new command line option --filters to set the filter
412 chain using liblzma filter string syntax.
414 - Added new command line options --filters1 ... --filters9 to
415 set additional filter chains using liblzma filter string
416 syntax. The --block-list option now allows specifying filter
417 chains that were set using these new options.
419 - Added support for Linux Landlock as a sandboxing method.
421 - xzdec now supports pledge(2), Capsicum, and Linux Landlock as
424 - Progress indicator time stats remain accurate after pausing
427 - Ported xz and xzdec to Windows MSVC. Visual Studio 2015 or
432 - Supports pledge(2), Capsicum, and Linux Landlock sandboxing
435 - Replacement functions for getopt_long() are used on platforms
438 * Enabled unaligned access by default on PowerPC64LE and on RISC-V
439 targets that define __riscv_misaligned_fast.
443 - Added two new fuzz targets to OSS-Fuzz.
445 - Implemented Continuous Integration (CI) testing using
448 * Changed quoting style from `...' to '...' in all messages,
449 scripts, and documentation.
451 * Added basic Codespell support to help catch typo errors.
456 * Not changed: Memory sanitizer (MSAN) has a false positive
457 in the CRC CLMUL code which also makes OSS Fuzz unhappy.
458 Valgrind is smarter and doesn't complain.
460 A revision to the CLMUL code is coming anyway and this issue
461 will be cleaned up as part of it. It won't be backported to
462 5.6.x or 5.4.x because the old code isn't wrong. There is
463 no reason to risk introducing regressions in old branches
464 just to silence a false positive.
468 - lzma_index_decoder() and lzma_index_buffer_decode(): Fix
469 a missing output pointer initialization (*i = NULL) if the
470 functions are called with invalid arguments. The API docs
471 say that such an initialization is always done. In practice
472 this matters very little because the problem can only occur
473 if the calling application has a bug and these functions
474 return LZMA_PROG_ERROR.
476 - lzma_str_to_filters(): Fix a missing output pointer
477 initialization (*error_pos = 0). This is very similar
480 - Fix C standard conformance with function pointer types.
481 This newly showed up with Clang 17 with -fsanitize=undefined.
482 There are no bug reports about this.
484 - Fix building with NVIDIA HPC SDK.
488 - Fix a C standard conformance issue in --block-list parsing
489 (arithmetic on a null pointer).
491 - Fix a warning from GNU groff when processing the man page:
492 "warning: cannot select font 'CW'"
494 - Fix outdated threading related information on the man page.
498 - With "less" version 451 and later, use "||-" instead of "|-"
499 in the environment variable LESSOPEN. This way compressed
500 files that contain no uncompressed data are shown correctly
503 - With "less" version 632 and later, use --show-preproc-errors
504 to make "less" show a warning on decompression errors.
506 * Autotools-based build system (configure):
508 - Symbol versioning variant can now be overridden with
509 --enable-symbol-versions. Documentation in INSTALL was
514 - Linux on MicroBlaze is handled specially now. This matches
515 the changes made to the Autotools-based build in XZ Utils
518 - Disable symbol versioning on non-glibc Linux to match what
519 the Autotools build does. For example, symbol versioning
520 isn't enabled with musl.
522 - Symbol versioning variant can now be overridden by setting
523 SYMBOL_VERSIONING to "OFF", "generic", or "linux".
527 - Clarify the description of --disable-assembler in INSTALL.
528 The option only affects 32-bit x86 assembly usage.
530 - Add doc/examples/11_file_info.c. It was added to the
531 Git repository in 2017 but forgotten to be added into
532 distribution tarballs.
534 - Don't install the TODO file as part of the documentation.
535 The file is out of date.
537 - Update home page URLs back to their old locations on
540 - Update maintainer info.
545 * Fixed a bug involving internal function pointers in liblzma not
546 being initialized to NULL. The bug can only be triggered if
547 lzma_filters_update() is called on a LZMA1 encoder, so it does
548 not affect xz or any application known to us that uses liblzma.
552 - Fixed a regression introduced in 5.4.2 that caused encoding
553 in the raw format to unnecessarily fail if --suffix was not
554 used. For instance, the following command no longer reports
555 that --suffix must be used:
557 echo foo | xz --format=raw --lzma2 | wc -c
559 - Fixed an issue on MinGW-w64 builds that prevented reading
560 from or writing to non-terminal character devices like NUL.
569 - Use __attribute__((__no_sanitize_address__)) to avoid address
570 sanitization with CRC64 CLMUL. It uses 16-byte-aligned reads
571 which can extend past the bounds of the input buffer and
572 inherently trigger address sanitization errors. This isn't
575 - Fixed an assertion failure that could be triggered by a large
576 unpadded_size argument. It was verified that there was no
577 other bug than the assertion failure.
579 - Fixed a bug that prevented building with Windows Vista
580 threading when __attribute__((__constructor__)) is not
583 * xz now properly handles special files such as "con" or "nul" on
584 Windows. Before this fix, the following wrote "foo" to the
585 console and deleted the input file "con_xz":
587 echo foo | xz > con_xz
588 xz --suffix=_xz --decompress con_xz
592 - Allow builds with Windows win95 threading and small mode when
593 __attribute__((__constructor__)) is supported.
595 - Added a new line to liblzma.pc for MSYS2 (Windows):
597 Cflags.private: -DLZMA_API_STATIC
599 When compiling code that will link against static liblzma,
600 the LZMA_API_STATIC macro needs to be defined on Windows.
602 - CMake specific changes:
604 * Fixed a bug that allowed CLOCK_MONOTONIC to be used even
605 if the check for it failed.
607 * Fixed a bug where configuring CMake multiple times
608 resulted in HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC
611 * Fixed the build with MinGW-w64-based Clang/LLVM 17.
612 llvm-windres now has more accurate GNU windres emulation
613 so the GNU windres workaround from 5.4.1 is needed with
614 llvm-windres version 17 too.
616 * The import library on Windows is now properly named
617 "liblzma.dll.a" instead of "libliblzma.dll.a"
619 * Fixed a bug causing the Ninja Generator to fail on
620 UNIX-like systems. This bug was introduced in 5.4.0.
622 * Added a new option to disable CLMUL CRC64.
624 * A module-definition (.def) file is now created when
625 building liblzma.dll with MinGW-w64.
627 * The pkg-config liblzma.pc file is now installed on all
628 builds except when using MSVC on Windows.
630 * Added large file support by default for platforms that
631 need it to handle files larger than 2 GiB. This includes
632 MinGW-w64, even 64-bit builds.
634 * Small fixes and improvements to the tests.
636 * Updated translations: Chinese (simplified) and Esperanto.
641 * liblzma and xzdec can now build against WASI SDK when threading
642 support is disabled. xz and tests don't build yet.
646 - Fixed a bug preventing other projects from including liblzma
647 multiple times using find_package().
649 - Don't create broken symlinks in Cygwin and MSYS2 unless
650 supported by the environment. This prevented building for the
651 default MSYS2 environment. The problem was introduced in
656 - Small improvements to man pages.
658 - Small improvements and typo fixes for liblzma API
663 - Added a new section to INSTALL to describe basic test usage
664 and address recent questions about building the tests when
667 - Small fixes and improvements to the tests.
671 - Fixed a mistake that caused one of the error messages to not
672 be translated. This only affected versions 5.4.2 and 5.4.3.
674 - Updated the Chinese (simplified), Croatian, Esperanto, German,
675 Korean, Polish, Romanian, Spanish, Swedish, Ukrainian, and
676 Vietnamese translations.
678 - Updated the German, Korean, Romanian, and Ukrainian man page
684 * All fixes from 5.2.12
686 * Features in the CMake build can now be disabled as CMake cache
687 variables, similar to the Autotools build.
689 * Minor update to the Croatian translation.
694 * All fixes from 5.2.11 that were not included in 5.4.1.
696 * If xz is built with support for the Capsicum sandbox but running
697 in an environment that doesn't support Capsicum, xz now runs
698 normally without sandboxing instead of exiting with an error.
702 - Documentation was updated to improve the style, consistency,
703 and completeness of the liblzma API headers.
705 - The Doxygen-generated HTML documentation for the liblzma API
706 header files is now included in the source release and is
707 installed as part of "make install". All JavaScript is
708 removed to simplify license compliance and to reduce the
711 - Fixed a minor bug in lzma_str_from_filters() that produced
712 too many filters in the output string instead of reporting
713 an error if the input array had more than four filters. This
714 bug did not affect xz.
718 - autogen.sh now invokes the doxygen tool via the new wrapper
719 script doxygen/update-doxygen, unless the command line option
720 --no-doxygen is used.
722 - Added microlzma_encoder.c and microlzma_decoder.c to the
723 VS project files for Windows and to the CMake build. These
724 should have been included in 5.3.2alpha.
728 - Added a test to the CMake build that was forgotten in the
731 - Added and refactored a few tests.
735 - Updated the Brazilian Portuguese translation.
737 - Added Brazilian Portuguese man page translation.
744 - Fixed the return value of lzma_microlzma_encoder() if the
745 LZMA options lc/lp/pb are invalid. Invalid lc/lp/pb options
746 made the function return LZMA_STREAM_END without encoding
747 anything instead of returning LZMA_OPTIONS_ERROR.
749 - Windows / Visual Studio: Workaround a possible compiler bug
750 when targeting 32-bit x86 and compiling the CLMUL version of
751 the CRC64 code. The CLMUL code isn't enabled by the Windows
752 project files but it is in the CMake-based builds.
756 - Windows-specific CMake changes:
758 * Don't try to enable CLMUL CRC64 code if _mm_set_epi64x()
759 isn't available. This fixes CMake-based build with Visual
762 * Created a workaround for a build failure with windres
763 from GNU binutils. It is used only when the C compiler
764 is GCC (not Clang). The workaround is incompatible
765 with llvm-windres, resulting in "XZx20Utils" instead
766 of "XZ Utils" in the resource file, but without the
767 workaround llvm-windres works correctly. See the
768 comment in CMakeLists.txt for details.
770 * Included the resource files in the xz and xzdec build
771 rules. Building the command line tools is still
772 experimental but possible with MinGW-w64.
774 - Visual Studio: Added stream_decoder_mt.c to the project
775 files. Now the threaded decompressor lzma_stream_decoder_mt()
776 gets built. CMake-based build wasn't affected.
778 - Updated windows/INSTALL-MSVC.txt to mention that CMake-based
779 build is now the preferred method with Visual Studio. The
780 project files will probably be removed after 5.4.x releases.
782 - Changes to #defines in config.h:
784 * HAVE_DECL_CLOCK_MONOTONIC was replaced by
785 HAVE_CLOCK_MONOTONIC. The old macro was always defined
786 in configure-generated config.h to either 0 or 1. The
787 new macro is defined (to 1) only if the declaration of
788 CLOCK_MONOTONIC is available. This matches the way most
789 other config.h macros work and makes things simpler with
792 * HAVE_DECL_PROGRAM_INVOCATION_NAME was replaced by
793 HAVE_PROGRAM_INVOCATION_NAME for the same reason.
797 - Fixed test script compatibility with ancient /bin/sh
798 versions. Now the five test_compress_* tests should
799 no longer fail on Solaris 10.
801 - Added and refactored a few tests.
805 - Updated the Catalan and Esperanto translations.
807 - Added Korean and Ukrainian man page translations.
812 This bumps the minor version of liblzma because new features were
813 added. The API and ABI are still backward compatible with liblzma
818 * All fixes from 5.2.10.
820 * The ARM64 filter is now stable. The xz option is now --arm64.
821 Decompression requires XZ Utils 5.4.0. In the future the ARM64
822 filter will be supported by XZ for Java, XZ Embedded (including
823 the version in Linux), LZMA SDK, and 7-Zip.
827 - Updated Catalan, Croatian, German, Romanian, and Turkish
830 - Updated German man page translations.
832 - Added Romanian man page translations.
834 Summary of new features added in the 5.3.x development releases:
838 - Added threaded .xz decompressor lzma_stream_decoder_mt().
839 It can use multiple threads with .xz files that have multiple
840 Blocks with size information in Block Headers. The threaded
841 encoder in xz has always created such files.
843 Single-threaded encoder cannot store the size information in
844 Block Headers even if one used LZMA_FULL_FLUSH to create
845 multiple Blocks, so this threaded decoder cannot use multiple
846 threads with such files.
848 If there are multiple Streams (concatenated .xz files), one
849 Stream will be decompressed completely before starting the
852 - A new decoder flag LZMA_FAIL_FAST was added. It makes the
853 threaded decompressor report errors soon instead of first
854 flushing all pending data before the error location.
857 * LZMA_FILTER_ARM64 is for ARM64 binaries.
858 * LZMA_FILTER_LZMA1EXT is for raw LZMA1 streams that don't
859 necessarily use the end marker.
861 - Added lzma_str_to_filters(), lzma_str_from_filters(), and
862 lzma_str_list_filters() to convert a preset or a filter chain
863 string to a lzma_filter[] and vice versa. These should make
864 it easier to write applications that allow users to specify
865 custom compression options.
867 - Added lzma_filters_free() which can be convenient for freeing
868 the filter options in a filter chain (an array of lzma_filter
871 - lzma_file_info_decoder() to makes it a little easier to get
872 the Index field from .xz files. This helps in getting the
873 uncompressed file size but an easy-to-use random access
874 API is still missing which has existed in XZ for Java for
877 - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
878 It is used by erofs-utils and may be used by others too.
880 The MicroLZMA format is a raw LZMA stream (without end marker)
881 whose first byte (always 0x00) has been replaced with
882 bitwise-negation of the LZMA properties (lc/lp/pb). It was
883 created for use in EROFS but may be used in other contexts
884 as well where it is important to avoid wasting bytes for
885 stream headers or footers. The format is also supported by
886 XZ Embedded (the XZ Embedded version in Linux got MicroLZMA
887 support in Linux 5.16).
889 The MicroLZMA encoder API in liblzma can compress into a
890 fixed-sized output buffer so that as much data is compressed
891 as can be fit into the buffer while still creating a valid
892 MicroLZMA stream. This is needed for EROFS.
894 - Added lzma_lzip_decoder() to decompress the .lz (lzip) file
895 format version 0 and the original unextended version 1 files.
896 Also lzma_auto_decoder() supports .lz files.
898 - lzma_filters_update() can now be used with the multi-threaded
899 encoder (lzma_stream_encoder_mt()) to change the filter chain
900 after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
902 - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
903 finders that require at least 3 or 4. Now it is internally
904 rounded up if needed.
906 - CLMUL-based CRC64 on x86-64 and E2K with runtime processor
907 detection. On 32-bit x86 it currently isn't available unless
908 --disable-assembler is used which can make the non-CLMUL
909 CRC64 slower; this might be fixed in the future.
911 - Building with --disable-threads --enable-small
912 is now thread-safe if the compiler supports
913 __attribute__((__constructor__)).
917 - Using -T0 (--threads=0) will now use multi-threaded encoder
918 even on a single-core system. This is to ensure that output
919 from the same xz binary is identical on both single-core and
922 - --threads=+1 or -T+1 is now a way to put xz into
923 multi-threaded mode while using only one worker thread.
924 The + is ignored if the number is not 1.
926 - A default soft memory usage limit is now used for compression
927 when -T0 is used and no explicit limit has been specified.
928 This soft limit is used to restrict the number of threads
929 but if the limit is exceeded with even one thread then xz
930 will continue with one thread using the multi-threaded
931 encoder and this limit is ignored. If the number of threads
932 is specified manually then no default limit will be used;
933 this affects only -T0.
935 This change helps on systems that have very many cores and
936 using all of them for xz makes no sense. Previously xz -T0
937 could run out of memory on such systems because it attempted
938 to reserve memory for too many threads.
940 This also helps with 32-bit builds which don't have a large
941 amount of address space that would be required for many
942 threads. The default soft limit for -T0 is at most 1400 MiB
943 on all 32-bit platforms.
945 - Previously a low value in --memlimit-compress wouldn't cause
946 xz to switch from multi-threaded mode to single-threaded mode
947 if the limit cannot otherwise be met; xz failed instead. Now
948 xz can switch to single-threaded mode and then, if needed,
949 scale down the LZMA2 dictionary size too just like it already
950 did when it was started in single-threaded mode.
952 - The option --no-adjust no longer prevents xz from scaling down
953 the number of threads as that doesn't affect the compressed
954 output (only performance). Now --no-adjust only prevents
955 adjustments that affect compressed output, that is, with
956 --no-adjust xz won't switch from multi-threaded mode to
957 single-threaded mode and won't scale down the LZMA2
960 - Added a new option --memlimit-mt-decompress=LIMIT. This is
961 used to limit the number of decompressor threads (possibly
962 falling back to single-threaded mode) but it will never make
963 xz refuse to decompress a file. This has a system-specific
964 default value because without any limit xz could end up
965 allocating memory for the whole compressed input file, the
966 whole uncompressed output file, multiple thread-specific
967 decompressor instances and so on. Basically xz could
968 attempt to use an insane amount of memory even with fairly
969 common files. The system-specific default value is currently
970 the same as the one used for compression with -T0.
972 The new option works together with the existing option
973 --memlimit-decompress=LIMIT. The old option sets a hard limit
974 that must not be exceeded (xz will refuse to decompress)
975 while the new option only restricts the number of threads.
976 If the limit set with --memlimit-mt-decompress is greater
977 than the limit set with --memlimit-compress, then the latter
978 value is used also for --memlimit-mt-decompress.
980 - Added new information to the output of xz --info-memory and
981 new fields to the output of xz --robot --info-memory.
983 - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
984 now that liblzma handles it.
986 - Don't mention endianness for ARM and ARM-Thumb filters in
987 --long-help. The filters only work for little endian
988 instruction encoding but modern ARM processors using
989 big endian data access still use little endian
990 instruction encoding. So the help text was misleading.
991 In contrast, the PowerPC filter is only for big endian
992 32/64-bit PowerPC code. Little endian PowerPC would need
995 - Added decompression support for the .lz (lzip) file format
996 version 0 and the original unextended version 1. It is
997 autodetected by default. See also the option --format on
1000 - Sandboxing enabled by default:
1001 * Capsicum (FreeBSD)
1002 * pledge(2) (OpenBSD)
1004 * Scripts now support the .lz format using xz.
1006 * A few new tests were added.
1008 * The liblzma-specific tests are now supported in CMake-based
1009 builds too ("make test").
1012 5.3.5beta (2022-12-01)
1014 * All fixes from 5.2.9.
1018 - Added new LZMA_FILTER_LZMA1EXT for raw encoder and decoder to
1019 handle raw LZMA1 streams that don't have end of payload marker
1020 (EOPM) alias end of stream (EOS) marker. It can be used in
1021 filter chains, for example, with the x86 BCJ filter.
1023 - Added lzma_str_to_filters(), lzma_str_from_filters(), and
1024 lzma_str_list_filters() to make it easier for applications
1025 to get custom compression options from a user and convert
1026 it to an array of lzma_filter structures.
1028 - Added lzma_filters_free().
1030 - lzma_filters_update() can now be used with the multi-threaded
1031 encoder (lzma_stream_encoder_mt()) to change the filter chain
1032 after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
1034 - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
1035 finders that require at least 3 or 4. Now it is internally
1036 rounded up if needed.
1038 - ARM64 filter was modified. It is still experimental.
1040 - Fixed LTO build with Clang if -fgnuc-version=10 or similar
1041 was used to make Clang look like GCC >= 10. Now it uses
1042 __has_attribute(__symver__) which should be reliable.
1046 - --threads=+1 or -T+1 is now a way to put xz into multi-threaded
1047 mode while using only one worker thread.
1049 - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
1050 now that liblzma handles it.
1052 * Updated translations: Chinese (simplified), Korean, and Turkish.
1055 5.3.4alpha (2022-11-15)
1057 * All fixes from 5.2.7 and 5.2.8.
1061 - Minor improvements to the threaded decoder.
1063 - Added CRC64 implementation that uses SSSE3, SSE4.1, and CLMUL
1064 instructions on 32/64-bit x86 and E2K. On 32-bit x86 it's
1065 not enabled unless --disable-assembler is used but then
1066 the non-CLMUL code might be slower. Processor support is
1067 detected at runtime so this is built by default on x86-64
1068 and E2K. On these platforms, if compiler flags indicate
1069 unconditional CLMUL support (-msse4.1 -mpclmul) then the
1070 generic version is not built, making liblzma 8-9 KiB smaller
1071 compared to having both versions included.
1073 With extremely compressible files this can make decompression
1074 up to twice as fast but with typical files 5 % improvement
1075 is a more realistic expectation.
1077 The CLMUL version is slower than the generic version with
1078 tiny inputs (especially at 1-8 bytes per call, but up to
1079 16 bytes). In normal use in xz this doesn't matter at all.
1081 - Added an experimental ARM64 filter. This is *not* the final
1082 version! Files created with this experimental version won't
1083 be supported in the future versions! The filter design is
1084 a compromise where improving one use case makes some other
1087 - Added decompression support for the .lz (lzip) file format
1088 version 0 and the original unextended version 1. See the
1089 API docs of lzma_lzip_decoder() for details. Also
1090 lzma_auto_decoder() supports .lz files.
1092 - Building with --disable-threads --enable-small
1093 is now thread-safe if the compiler supports
1094 __attribute__((__constructor__))
1098 - Added support for OpenBSD's pledge(2) as a sandboxing method.
1100 - Don't mention endianness for ARM and ARM-Thumb filters in
1101 --long-help. The filters only work for little endian
1102 instruction encoding but modern ARM processors using
1103 big endian data access still use little endian
1104 instruction encoding. So the help text was misleading.
1105 In contrast, the PowerPC filter is only for big endian
1106 32/64-bit PowerPC code. Little endian PowerPC would need
1109 - Added --experimental-arm64. This will be renamed once the
1110 filter is finished. Files created with this experimental
1111 filter will not be supported in the future!
1113 - Added new fields to the output of xz --robot --info-memory.
1115 - Added decompression support for the .lz (lzip) file format
1116 version 0 and the original unextended version 1. It is
1117 autodetected by default. See also the option --format on
1120 * Scripts now support the .lz format using xz.
1124 - New #defines in config.h: HAVE_ENCODER_ARM64,
1125 HAVE_DECODER_ARM64, HAVE_LZIP_DECODER, HAVE_CPUID_H,
1126 HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR, HAVE_USABLE_CLMUL
1128 - New configure options: --disable-clmul-crc,
1129 --disable-microlzma, --disable-lzip-decoder, and
1130 'pledge' is now an option in --enable-sandbox (but
1131 it's autodetected by default anyway).
1133 - INSTALL was updated to document the new configure options.
1135 - PACKAGERS now lists also --disable-microlzma and
1136 --disable-lzip-decoder as configure options that must
1137 not be used in builds for non-embedded use.
1141 - Fix some of the tests so that they skip instead of fail if
1142 certain features have been disabled with configure options.
1143 It's still not perfect.
1145 - Other improvements to tests.
1147 * Updated translations: Croatian, Finnish, Hungarian, Polish,
1148 Romanian, Spanish, Swedish, and Ukrainian.
1151 5.3.3alpha (2022-08-22)
1153 * All fixes from 5.2.6.
1157 - Fixed 32-bit build.
1159 - Added threaded .xz decompressor lzma_stream_decoder_mt().
1160 It can use multiple threads with .xz files that have multiple
1161 Blocks with size information in Block Headers. The threaded
1162 encoder in xz has always created such files.
1164 Single-threaded encoder cannot store the size information in
1165 Block Headers even if one used LZMA_FULL_FLUSH to create
1166 multiple Blocks, so this threaded decoder cannot use multiple
1167 threads with such files.
1169 If there are multiple Streams (concatenated .xz files), one
1170 Stream will be decompressed completely before starting the
1173 - A new decoder flag LZMA_FAIL_FAST was added. It makes the
1174 threaded decompressor report errors soon instead of first
1175 flushing all pending data before the error location.
1179 - Using -T0 (--threads=0) will now use multi-threaded encoder
1180 even on a single-core system. This is to ensure that output
1181 from the same xz binary is identical on both single-core and
1184 - A default soft memory usage limit is now used for compression
1185 when -T0 is used and no explicit limit has been specified.
1186 This soft limit is used to restrict the number of threads
1187 but if the limit is exceeded with even one thread then xz
1188 will continue with one thread using the multi-threaded
1189 encoder and this limit is ignored. If the number of threads
1190 is specified manually then no default limit will be used;
1191 this affects only -T0.
1193 This change helps on systems that have very many cores and
1194 using all of them for xz makes no sense. Previously xz -T0
1195 could run out of memory on such systems because it attempted
1196 to reserve memory for too many threads.
1198 This also helps with 32-bit builds which don't have a large
1199 amount of address space that would be required for many
1200 threads. The default limit is 1400 MiB on all 32-bit
1203 Now xz -T0 should just work. It might use too few threads
1204 in some cases but at least it shouldn't easily run out of
1205 memory. It's possible that this will be tweaked before 5.4.0.
1207 - Changes to --memlimit-compress and --no-adjust:
1209 In single-threaded mode, --memlimit-compress can make xz
1210 scale down the LZMA2 dictionary size to meet the memory usage
1211 limit. This obviously affects the compressed output. However,
1212 if xz was in threaded mode, --memlimit-compress could make xz
1213 reduce the number of threads but it wouldn't make xz switch
1214 from multi-threaded mode to single-threaded mode or scale
1215 down the LZMA2 dictionary size. This seemed illogical.
1217 Now --memlimit-compress can make xz switch to single-threaded
1218 mode if one thread in multi-threaded mode uses too much
1219 memory. If memory usage is still too high, then the LZMA2
1220 dictionary size can be scaled down too.
1222 The option --no-adjust was also changed so that it no longer
1223 prevents xz from scaling down the number of threads as that
1224 doesn't affect compressed output (only performance). After
1225 this commit --no-adjust only prevents adjustments that affect
1226 compressed output, that is, with --no-adjust xz won't switch
1227 from multithreaded mode to single-threaded mode and won't
1228 scale down the LZMA2 dictionary size.
1230 - Added a new option --memlimit-mt-decompress=LIMIT. This is
1231 used to limit the number of decompressor threads (possibly
1232 falling back to single-threaded mode) but it will never make
1233 xz refuse to decompress a file. This has a system-specific
1234 default value because without any limit xz could end up
1235 allocating memory for the whole compressed input file, the
1236 whole uncompressed output file, multiple thread-specific
1237 decompressor instances and so on. Basically xz could
1238 attempt to use an insane amount of memory even with fairly
1241 The new option works together with the existing option
1242 --memlimit-decompress=LIMIT. The old option sets a hard limit
1243 that must not be exceeded (xz will refuse to decompress)
1244 while the new option only restricts the number of threads.
1245 If the limit set with --memlimit-mt-decompress is greater
1246 than the limit set with --memlimit-compress, then the latter
1247 value is used also for --memlimit-mt-decompress.
1251 - Added a few more tests.
1253 - Added tests/code_coverage.sh to create a code coverage report
1258 - Automake's parallel test harness is now used to make tests
1261 - Added the CMake files to the distribution tarball. These were
1262 supposed to be in 5.2.5 already.
1264 - Added liblzma tests to the CMake build.
1266 - Windows: Fix building of liblzma.dll with the included
1267 Visual Studio project files.
1270 5.3.2alpha (2021-10-28)
1272 This release was made on short notice so that recent erofs-utils can
1273 be built with LZMA support without needing a snapshot from xz.git.
1274 Thus many pending things were not included, not even updated
1275 translations (which would need to be updated for the new --list
1278 * All fixes from 5.2.5.
1282 - When copying metadata from the source file to the destination
1283 file, don't try to set the group (GID) if it is already set
1284 correctly. This avoids a failure on OpenBSD (and possibly on
1285 a few other OSes) where files may get created so that their
1286 group doesn't belong to the user, and fchown(2) can fail even
1287 if it needs to do nothing.
1289 - The --keep option now accepts symlinks, hardlinks, and
1290 setuid, setgid, and sticky files. Previously this required
1293 - Split the long strings used in --list and --info-memory modes
1294 to make them much easier for translators.
1296 - If built with sandbox support and enabling the sandbox fails,
1297 xz will now immediately exit with exit status of 1. Previously
1298 it would only display a warning if -vv was used.
1300 - Cap --memlimit-compress to 2000 MiB on MIPS32 because on
1301 MIPS32 userspace processes are limited to 2 GiB of address
1306 - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
1307 The API is in lzma/container.h.
1309 The MicroLZMA format is a raw LZMA stream (without end marker)
1310 whose first byte (always 0x00) has been replaced with
1311 bitwise-negation of the LZMA properties (lc/lp/pb). It was
1312 created for use in EROFS but may be used in other contexts
1313 as well where it is important to avoid wasting bytes for
1314 stream headers or footers. The format is also supported by
1317 The MicroLZMA encoder API in liblzma can compress into a
1318 fixed-sized output buffer so that as much data is compressed
1319 as can be fit into the buffer while still creating a valid
1320 MicroLZMA stream. This is needed for EROFS.
1322 - Added fuzzing support.
1324 - Support Intel Control-flow Enforcement Technology (CET) in
1325 32-bit x86 assembly files.
1327 - Visual Studio: Use non-standard _MSVC_LANG to detect C++
1328 standard version in the lzma.h API header. It's used to
1329 detect when "noexcept" can be used.
1333 - Fix exit status of xzdiff/xzcmp. Exit status could be 2 when
1334 the correct value is 1.
1336 - Fix exit status of xzgrep.
1338 - Detect corrupt .bz2 files in xzgrep.
1340 - Add zstd support to xzgrep and xzdiff/xzcmp.
1342 - Fix less(1) version detection in xzless. It failed if the
1343 version number from "less -V" contained a dot.
1345 * Fix typos and technical issues in man pages.
1349 - Windows: Fix building of resource files when config.h isn't
1350 used. CMake + Visual Studio can now build liblzma.dll.
1352 - Various fixes to the CMake support. It might still need a few
1353 more fixes even for liblzma-only builds.
1356 5.3.1alpha (2018-04-29)
1358 * All fixes from 5.2.4.
1360 * Add lzma_file_info_decoder() into liblzma and use it in xz to
1361 implement the --list feature.
1363 * Capsicum sandbox support is enabled by default where available
1371 - lzma_index_append(): Fix an assertion failure that could be
1372 triggered by a large unpadded_size argument. It was verified
1373 that there was no other bug than the assertion failure.
1375 - lzma_index_decoder() and lzma_index_buffer_decode(): Fix
1376 a missing output pointer initialization (*i = NULL) if the
1377 functions are called with invalid arguments. The API docs
1378 say that such an initialization is always done. In practice
1379 this matters very little because the problem can only occur
1380 if the calling application has a bug and these functions
1381 return LZMA_PROG_ERROR.
1383 - Fix C standard conformance with function pointer types.
1384 This newly showed up with Clang 17 with -fsanitize=undefined.
1385 There are no bug reports about this.
1387 - Fix building with NVIDIA HPC SDK.
1389 - Fix building with Windows Vista threads and --enable-small.
1390 (CMake build doesn't support ENABLE_SMALL in XZ Utils 5.2.x.)
1394 - Fix a C standard conformance issue in --block-list parsing
1395 (arithmetic on a null pointer).
1397 - Fix a warning from GNU groff when processing the man page:
1398 "warning: cannot select font 'CW'"
1400 - Windows: Handle special files such as "con" or "nul". Earlier
1401 the following wrote "foo" to the console and deleted the input
1404 echo foo | xz > con_xz
1405 xz --suffix=_xz --decompress con_xz
1407 - Windows: Fix an issue that prevented reading from or writing
1408 to non-terminal character devices like NUL.
1412 - With "less" version 451 and later, use "||-" instead of "|-"
1413 in the environment variable LESSOPEN. This way compressed
1414 files that contain no uncompressed data are shown correctly
1417 - With "less" version 632 and later, use --show-preproc-errors
1418 to make "less" show a warning on decompression errors.
1422 - Add a new line to liblzma.pc for MSYS2 (Windows):
1424 Cflags.private: -DLZMA_API_STATIC
1426 When compiling code that will link against static liblzma,
1427 the LZMA_API_STATIC macro needs to be defined on Windows.
1429 - Autotools (configure):
1431 * Symbol versioning variant can now be overridden with
1432 --enable-symbol-versions. Documentation in INSTALL was
1437 * Fix a bug that prevented other projects from including
1438 liblzma multiple times using find_package().
1440 * Fix a bug where configuring CMake multiple times resulted
1441 in HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC not being
1444 * Fix the build with MinGW-w64-based Clang/LLVM 17.
1445 llvm-windres now has more accurate GNU windres emulation
1446 so the GNU windres workaround from 5.4.1 is needed with
1447 llvm-windres version 17 too.
1449 * The import library on Windows is now properly named
1450 "liblzma.dll.a" instead of "libliblzma.dll.a"
1452 * Add large file support by default for platforms that
1453 need it to handle files larger than 2 GiB. This includes
1454 MinGW-w64, even 64-bit builds.
1456 * Linux on MicroBlaze is handled specially now. This
1457 matches the changes made to the Autotools-based build
1458 in XZ Utils 5.4.2 and 5.2.11.
1460 * Disable symbol versioning on non-glibc Linux to match
1461 what the Autotools build does. For example, symbol
1462 versioning isn't enabled with musl.
1464 * Symbol versioning variant can now be overridden by
1465 setting SYMBOL_VERSIONING to "OFF", "generic", or
1470 - Clarify the description of --disable-assembler in INSTALL.
1471 The option only affects 32-bit x86 assembly usage.
1473 - Don't install the TODO file as part of the documentation.
1474 The file is out of date.
1476 - Update home page URLs back to their old locations on
1479 - Update maintainer info.
1484 * Fixed a build system bug that prevented building liblzma as a
1485 shared library when configured with --disable-threads. This bug
1486 affected releases 5.2.6 to 5.2.11 and 5.4.0 to 5.4.2.
1488 * Include <intrin.h> for Windows intrinsic functions where they are
1489 needed. This fixed a bug that prevented building liblzma using
1490 clang-cl on Windows.
1492 * Minor update to the Croatian translation. The small change
1493 applies to a string in both 5.2 and 5.4 branches.
1498 * Removed all possible cases of null pointer + 0. It is undefined
1499 behavior in C99 and C17. This was detected by a sanitizer and had
1500 not caused any known issues.
1504 - Added a workaround for building with GCC on MicroBlaze Linux.
1505 GCC 12 on MicroBlaze doesn't support the __symver__ attribute
1506 even though __has_attribute(__symver__) returns true. The
1507 build is now done without the extra RHEL/CentOS 7 symbols
1508 that were added in XZ Utils 5.2.7. The workaround only
1509 applies to the Autotools build (not CMake).
1511 - CMake: Ensure that the C compiler language is set to C99 or
1514 - CMake changes from XZ Utils 5.4.1:
1516 * Added a workaround for a build failure with
1517 windres from GNU binutils.
1519 * Included the Windows resource files in the xz
1520 and xzdec build rules.
1525 * xz: Don't modify argv[] when parsing the --memlimit* and
1526 --block-list command line options. This fixes confusing
1527 arguments in process listing (like "ps auxf").
1529 * GNU/Linux only: Use __has_attribute(__symver__) to detect if
1530 that attribute is supported. This fixes build on Mandriva where
1531 Clang is patched to define __GNUC__ to 11 by default (instead
1532 of 4 as used by Clang upstream).
1539 - Fixed an infinite loop in LZMA encoder initialization
1540 if dict_size >= 2 GiB. (The encoder only supports up
1543 - Fixed two cases of invalid free() that can happen if
1544 a tiny allocation fails in encoder re-initialization
1545 or in lzma_filters_update(). These bugs had some
1546 similarities with the bug fixed in 5.2.7.
1548 - Fixed lzma_block_encoder() not allowing the use of
1549 LZMA_SYNC_FLUSH with lzma_code() even though it was
1550 documented to be supported. The sync-flush code in
1551 the Block encoder was already used internally via
1552 lzma_stream_encoder(), so this was just a missing flag
1553 in the lzma_block_encoder() API function.
1555 - GNU/Linux only: Don't put symbol versions into static
1556 liblzma as it breaks things in some cases (and even if
1557 it didn't break anything, symbol versions in static
1558 libraries are useless anyway). The downside of the fix
1559 is that if the configure options --with-pic or --without-pic
1560 are used then it's not possible to build both shared and
1561 static liblzma at the same time on GNU/Linux anymore;
1562 with those options --disable-static or --disable-shared
1565 * New email address for bug reports is <xz@tukaani.org> which
1566 forwards messages to Lasse Collin and Jia Tan.
1573 - If xz cannot remove an input file when it should, this
1574 is now treated as a warning (exit status 2) instead of
1575 an error (exit status 1). This matches GNU gzip and it
1576 is more logical as at that point the output file has
1577 already been successfully closed.
1579 - Fix handling of .xz files with an unsupported check type.
1580 Previously such printed a warning message but then xz
1581 behaved as if an error had occurred (didn't decompress,
1582 exit status 1). Now a warning is printed, decompression
1583 is done anyway, and exit status is 2. This used to work
1584 slightly before 5.0.0. In practice this bug matters only
1585 if xz has been built with some check types disabled. As
1586 instructed in PACKAGERS, such builds should be done in
1587 special situations only.
1589 - Fix "xz -dc --single-stream tests/files/good-0-empty.xz"
1590 which failed with "Internal error (bug)". That is,
1591 --single-stream was broken if the first .xz stream in
1592 the input file didn't contain any uncompressed data.
1594 - Fix displaying file sizes in the progress indicator when
1595 working in passthru mode and there are multiple input files.
1596 Just like "gzip -cdf", "xz -cdf" works like "cat" when the
1597 input file isn't a supported compressed file format. In
1598 this case the file size counters weren't reset between
1599 files so with multiple input files the progress indicator
1600 displayed an incorrect (too large) value.
1604 - API docs in lzma/container.h:
1605 * Update the list of decoder flags in the decoder
1607 * Explain LZMA_CONCATENATED behavior with .lzma files
1608 in lzma_auto_decoder() docs.
1610 - OpenBSD: Use HW_NCPUONLINE to detect the number of
1611 available hardware threads in lzma_physmem().
1613 - Fix use of wrong macro to detect x86 SSE2 support.
1614 __SSE2_MATH__ was used with GCC/Clang but the correct
1615 one is __SSE2__. The first one means that SSE2 is used
1616 for floating point math which is irrelevant here.
1617 The affected SSE2 code isn't used on x86-64 so this affects
1618 only 32-bit x86 builds that use -msse2 without -mfpmath=sse
1619 (there is no runtime detection for SSE2). It improves LZMA
1620 compression speed (not decompression).
1622 - Fix the build with Intel C compiler 2021 (ICC, not ICX)
1623 on Linux. It defines __GNUC__ to 10 but doesn't support
1624 the __symver__ attribute introduced in GCC 10.
1626 * Scripts: Ignore warnings from xz by using --quiet --no-warn.
1627 This is needed if the input .xz files use an unsupported
1632 - Updated Croatian and Turkish translations.
1634 - One new translations wasn't included because it needed
1635 technical fixes. It will be in upcoming 5.4.0. No new
1636 translations will be added to the 5.2.x branch anymore.
1638 - Renamed the French man page translation file from
1639 fr_FR.po to fr.po and thus also its install directory
1640 (like /usr/share/man/fr_FR -> .../fr).
1642 - Man page translations for upcoming 5.4.0 are now handled
1643 in the Translation Project.
1645 * Update doc/faq.txt a little so it's less out-of-date.
1652 - Made lzma_filters_copy() to never modify the destination
1653 array if an error occurs. lzma_stream_encoder() and
1654 lzma_stream_encoder_mt() already assumed this. Before this
1655 change, if a tiny memory allocation in lzma_filters_copy()
1656 failed it would lead to a crash (invalid free() or invalid
1657 memory reads) in the cleanup paths of these two encoder
1658 initialization functions.
1660 - Added missing integer overflow check to lzma_index_append().
1661 This affects xz --list and other applications that decode
1662 the Index field from .xz files using lzma_index_decoder().
1663 Normal decompression of .xz files doesn't call this code
1664 and thus most applications using liblzma aren't affected
1667 - Single-threaded .xz decoder (lzma_stream_decoder()): If
1668 lzma_code() returns LZMA_MEMLIMIT_ERROR it is now possible
1669 to use lzma_memlimit_set() to increase the limit and continue
1670 decoding. This was supposed to work from the beginning
1671 but there was a bug. With other decoders (.lzma or
1672 threaded .xz decoder) this already worked correctly.
1674 - Fixed accumulation of integrity check type statistics in
1675 lzma_index_cat(). This bug made lzma_index_checks() return
1676 only the type of the integrity check of the last Stream
1677 when multiple lzma_indexes were concatenated. Most
1678 applications don't use these APIs but in xz it made
1679 xz --list not list all check types from concatenated .xz
1680 files. In xz --list --verbose only the per-file "Check:"
1681 lines were affected and in xz --robot --list only the "file"
1684 - Added ABI compatibility with executables that were linked
1685 against liblzma in RHEL/CentOS 7 or other liblzma builds
1686 that had copied the problematic patch from RHEL/CentOS 7
1687 (xz-5.2.2-compat-libs.patch). For the details, see the
1688 comment at the top of src/liblzma/validate_map.sh.
1690 WARNING: This uses __symver__ attribute with GCC >= 10.
1691 In other cases the traditional __asm__(".symver ...")
1692 is used. Using link-time optimization (LTO, -flto) with
1693 GCC versions older than 10 can silently result in
1694 broken liblzma.so.5 (incorrect symbol versions)! If you
1695 want to use -flto with GCC, you must use GCC >= 10.
1696 LTO with Clang seems to work even with the traditional
1697 __asm__(".symver ...") method.
1699 * xzgrep: Fixed compatibility with old shells that break if
1700 comments inside command substitutions have apostrophes (').
1701 This problem was introduced in 5.2.6.
1705 - New #define in config.h: HAVE_SYMBOL_VERSIONS_LINUX
1707 - Windows: Fixed liblzma.dll build with Visual Studio project
1708 files. It broke in 5.2.6 due to a change that was made to
1709 improve CMake support.
1711 - Windows: Building liblzma with UNICODE defined should now
1714 - CMake files are now actually included in the release tarball.
1715 They should have been in 5.2.5 already.
1717 - Minor CMake fixes and improvements.
1719 * Added a new translation: Turkish
1726 - The --keep option now accepts symlinks, hardlinks, and
1727 setuid, setgid, and sticky files. Previously this required
1730 - When copying metadata from the source file to the destination
1731 file, don't try to set the group (GID) if it is already set
1732 correctly. This avoids a failure on OpenBSD (and possibly on
1733 a few other OSes) where files may get created so that their
1734 group doesn't belong to the user, and fchown(2) can fail even
1735 if it needs to do nothing.
1737 - Cap --memlimit-compress to 2000 MiB instead of 4020 MiB on
1738 MIPS32 because on MIPS32 userspace processes are limited
1739 to 2 GiB of address space.
1743 - Fixed a missing error-check in the threaded encoder. If a
1744 small memory allocation fails, a .xz file with an invalid
1745 Index field would be created. Decompressing such a file would
1746 produce the correct output but result in an error at the end.
1747 Thus this is a "mild" data corruption bug. Note that while
1748 a failed memory allocation can trigger the bug, it cannot
1749 cause invalid memory access.
1751 - The decoder for .lzma files now supports files that have
1752 uncompressed size stored in the header and still use the
1753 end of payload marker (end of stream marker) at the end
1754 of the LZMA stream. Such files are rare but, according to
1755 the documentation in LZMA SDK, they are valid.
1756 doc/lzma-file-format.txt was updated too.
1758 - Improved 32-bit x86 assembly files:
1759 * Support Intel Control-flow Enforcement Technology (CET)
1760 * Use non-executable stack on FreeBSD.
1762 - Visual Studio: Use non-standard _MSVC_LANG to detect C++
1763 standard version in the lzma.h API header. It's used to
1764 detect when "noexcept" can be used.
1768 - Fixed arbitrary command injection via a malicious filename
1769 (CVE-2022-1271, ZDI-CAN-16587). A standalone patch for
1770 this was released to the public on 2022-04-07. A slight
1771 robustness improvement has been made since then and, if
1772 using GNU or *BSD grep, a new faster method is now used
1773 that doesn't use the old sed-based construct at all. This
1774 also fixes bad output with GNU grep >= 3.5 (2020-09-27)
1775 when xzgrepping binary files.
1777 This vulnerability was discovered by:
1778 cleemy desu wayo working with Trend Micro Zero Day Initiative
1780 - Fixed detection of corrupt .bz2 files.
1782 - Improved error handling to fix exit status in some situations
1783 and to fix handling of signals: in some situations a signal
1784 didn't make xzgrep exit when it clearly should have. It's
1785 possible that the signal handling still isn't quite perfect
1786 but hopefully it's good enough.
1788 - Documented exit statuses on the man page.
1790 - xzegrep and xzfgrep now use "grep -E" and "grep -F" instead
1791 of the deprecated egrep and fgrep commands.
1793 - Fixed parsing of the options -E, -F, -G, -P, and -X. The
1794 problem occurred when multiple options were specified in
1795 a single argument, for example,
1797 echo foo | xzgrep -Fe foo
1799 treated foo as a filename because -Fe wasn't correctly
1802 - Added zstd support.
1806 - Fixed wrong exit status. Exit status could be 2 when the
1809 - Documented on the man page that exit status of 2 is used
1810 for decompression errors.
1812 - Added zstd support.
1816 - Fix less(1) version detection. It failed if the version number
1817 from "less -V" contained a dot.
1821 - Added new translations: Catalan, Croatian, Esperanto,
1822 Korean, Portuguese, Romanian, Serbian, Spanish, Swedish,
1825 - Updated the Brazilian Portuguese translation.
1827 - Added French man page translation. This and the existing
1828 German translation aren't complete anymore because the
1829 English man pages got a few updates and the translators
1830 weren't reached so that they could update their work.
1834 - Windows: Fix building of resource files when config.h isn't
1835 used. CMake + Visual Studio can now build liblzma.dll.
1837 - Various fixes to the CMake support. Building static or shared
1838 liblzma should work fine in most cases. In contrast, building
1839 the command line tools with CMake is still clearly incomplete
1840 and experimental and should be used for testing only.
1847 - Fixed several C99/C11 conformance bugs. Now the code is clean
1848 under gcc/clang -fsanitize=undefined. Some of these changes
1849 might have a negative effect on performance with old GCC
1850 versions or compilers other than GCC and Clang. The configure
1851 option --enable-unsafe-type-punning can be used to (mostly)
1852 restore the old behavior but it shouldn't normally be used.
1854 - Improved API documentation of lzma_properties_decode().
1856 - Added a very minor encoder speed optimization.
1860 - Fixed a crash in "xz -dcfv not_an_xz_file". All four options
1861 were required to trigger it. The crash occurred in the
1862 progress indicator code when xz was in passthru mode where
1863 xz works like "cat".
1865 - Fixed an integer overflow with 32-bit off_t. It could happen
1866 when decompressing a file that has a long run of zero bytes
1867 which xz would try to write as a sparse file. Since the build
1868 system enables large file support by default, off_t is
1869 normally 64-bit even on 32-bit systems.
1871 - Fixes for --flush-timeout:
1872 * Fix semi-busy-waiting.
1873 * Avoid unneeded flushes when no new input has arrived
1874 since the previous flush was completed.
1876 - Added a special case for 32-bit xz: If --memlimit-compress is
1877 used to specify a limit that exceeds 4020 MiB, the limit will
1878 be set to 4020 MiB. The values "0" and "max" aren't affected
1879 by this and neither is decompression. This hack can be
1880 helpful when a 32-bit xz has access to 4 GiB address space
1881 but the specified memlimit exceeds 4 GiB. This can happen
1882 e.g. with some scripts.
1884 - Capsicum sandbox is now enabled by default where available
1885 (FreeBSD >= 10). The sandbox debug messages (xz -vv) were
1886 removed since they seemed to be more annoying than useful.
1888 - DOS build now requires DJGPP 2.05 instead of 2.04beta.
1889 A workaround for a locale problem with DJGPP 2.05 was added.
1891 * xzgrep and other scripts:
1893 - Added a configure option --enable-path-for-scripts=PREFIX.
1894 It is disabled by default except on Solaris where the default
1895 is /usr/xpg4/bin. See INSTALL for details.
1897 - Added a workaround for a POSIX shell detection problem on
1902 - Added preliminary build instructions for z/OS. See INSTALL
1905 - Experimental CMake support was added. It should work to build
1906 static liblzma on a few operating systems. It may or may not
1907 work to build shared liblzma. On some platforms it can build
1908 xz and xzdec too but those are only for testing. See the
1909 comment in the beginning of CMakeLists.txt for details.
1911 - Visual Studio project files were updated.
1912 WindowsTargetPlatformVersion was removed from VS2017 files
1913 and set to "10.0" in the added VS2019 files. In the future
1914 the VS project files will be removed when CMake support is
1917 - New #defines in config.h: HAVE___BUILTIN_ASSUME_ALIGNED,
1918 HAVE___BUILTIN_BSWAPXX, and TUKLIB_USE_UNSAFE_TYPE_PUNNING.
1920 - autogen.sh has a new optional dependency on po4a and a new
1921 option --no-po4a to skip that step. This matters only if one
1922 wants to remake the build files. po4a is used to update the
1923 translated man pages but as long as the man pages haven't
1924 been modified, there's nothing to update and one can use
1925 --no-po4a to avoid the dependency on po4a.
1929 - XZ Utils translations are now handled by the Translation
1930 Project: https://translationproject.org/domain/xz.html
1932 - All man pages are now included in German too.
1934 - New xz translations: Brazilian Portuguese, Finnish,
1935 Hungarian, Chinese (simplified), Chinese (traditional),
1936 and Danish (partial translation)
1938 - Updated xz translations: French, German, Italian, and Polish
1940 - Unfortunately a few new xz translations weren't included due
1941 to technical problems like too long lines in --help output or
1942 misaligned column headings in tables. In the future, many of
1943 these strings will be split and e.g. the table column
1944 alignment will be handled in software. This should make the
1945 strings easier to translate.
1952 - Allow 0 as memory usage limit instead of returning
1953 LZMA_PROG_ERROR. Now 0 is treated as if 1 byte was specified,
1954 which effectively is the same as 0.
1956 - Use "noexcept" keyword instead of "throw()" in the public
1957 headers when a C++11 (or newer standard) compiler is used.
1959 - Added a portability fix for recent Intel C Compilers.
1961 - Microsoft Visual Studio build files have been moved under
1962 windows/vs2013 and windows/vs2017.
1966 - Fix "xz --list --robot missing_or_bad_file.xz" which would
1967 try to print an uninitialized string and thus produce garbage
1968 output. Since the exit status is non-zero, most uses of such
1969 a command won't try to interpret the garbage output.
1971 - "xz --list foo.xz" could print "Internal error (bug)" in a
1972 corner case where a specific memory usage limit had been set.
1979 - Always close a file before trying to delete it to avoid
1980 problems on some operating system and file system combinations.
1982 - Fixed copying of file timestamps on Windows.
1984 - Added experimental (disabled by default) sandbox support using
1985 Capsicum (FreeBSD >= 10). See --enable-sandbox in INSTALL.
1987 * C99/C11 conformance fixes to liblzma. The issues affected at least
1988 some builds using link-time optimizations.
1990 * Fixed bugs in the rarely-used function lzma_index_dup().
1992 * Use of external SHA-256 code is now disabled by default.
1993 It can still be enabled by passing --enable-external-sha256
1994 to configure. The reasons to disable it by default (see INSTALL
1997 - Some OS-specific SHA-256 implementations conflict with
1998 OpenSSL and cause problems in programs that link against both
1999 liblzma and libcrypto. At least FreeBSD 10 and MINIX 3.3.0
2002 - The internal SHA-256 is faster than the SHA-256 code in
2003 some operating systems.
2005 * Changed CPU core count detection to use sched_getaffinity() on
2006 GNU/Linux and GNU/kFreeBSD.
2008 * Fixes to the build-system and xz to make xz buildable even when
2009 encoders, decoders, or threading have been disabled from libilzma
2010 using configure options. These fixes added two new #defines to
2011 config.h: HAVE_ENCODERS and HAVE_DECODERS.
2016 * Fixed bugs in QNX-specific code.
2018 * Omitted the use of pipe2() even if it is available to avoid
2019 portability issues with some old Linux and glibc combinations.
2021 * Updated German translation.
2023 * Added project files to build static and shared liblzma (not the
2024 whole XZ Utils) with Visual Studio 2013 update 2 or later.
2026 * Documented that threaded decompression hasn't been implemented
2027 yet. A 5.2.0 NEWS entry describing multi-threading support had
2028 incorrectly said "decompression" when it should have said
2034 * Fixed a compression-ratio regression in fast mode of LZMA1 and
2035 LZMA2. The bug is present in 5.1.4beta and 5.2.0 releases.
2037 * Fixed a portability problem in xz that affected at least OpenBSD.
2039 * Fixed xzdiff to be compatible with FreeBSD's mktemp which differs
2040 from most other mktemp implementations.
2042 * Changed CPU core count detection to use cpuset_getaffinity() on
2050 * All fixes from 5.0.8
2052 * liblzma: Fixed lzma_stream_encoder_mt_memusage() when a preset
2055 * xzdiff: If mktemp isn't installed, mkdir will be used as
2056 a fallback to create a temporary directory. Installing mktemp
2057 is still recommended.
2059 * Updated French, German, Italian, Polish, and Vietnamese
2062 Summary of fixes and new features added in the 5.1.x development
2067 - Added support for multi-threaded compression. See the
2068 lzma_mt structure, lzma_stream_encoder_mt(), and
2069 lzma_stream_encoder_mt_memusage() in <lzma/container.h>,
2070 lzma_get_progress() in <lzma/base.h>, and lzma_cputhreads()
2071 in <lzma/hardware.h> for details.
2073 - Made the uses of lzma_allocator const correct.
2075 - Added lzma_block_uncomp_encode() to create uncompressed
2076 .xz Blocks using LZMA2 uncompressed chunks.
2078 - Added support for LZMA_IGNORE_CHECK.
2080 - A few speed optimizations were made.
2082 - Added support for symbol versioning. It is enabled by default
2083 on GNU/Linux, other GNU-based systems, and FreeBSD.
2085 - liblzma (not the whole XZ Utils) should now be buildable
2086 with MSVC 2013 update 2 or later using windows/config.h.
2090 - Fixed a race condition in the signal handling. It was
2091 possible that e.g. the first SIGINT didn't make xz exit
2092 if reading or writing blocked and one had bad luck. The fix
2093 is non-trivial, so as of writing it is unknown if it will be
2094 backported to the v5.0 branch.
2096 - Multi-threaded compression can be enabled with the
2097 --threads (-T) option.
2098 [Fixed: This originally said "decompression".]
2100 - New command line options in xz: --single-stream,
2101 --block-size=SIZE, --block-list=SIZES,
2102 --flush-timeout=TIMEOUT, and --ignore-check.
2104 - xz -lvv now shows the minimum xz version that is required to
2105 decompress the file. Currently it is 5.0.0 for all supported
2106 .xz files except files with empty LZMA2 streams require 5.0.2.
2108 * xzdiff and xzgrep now support .lzo files if lzop is installed.
2109 The .tzo suffix is also recognized as a shorthand for .tar.lzo.
2112 5.1.4beta (2014-09-14)
2114 * All fixes from 5.0.6
2116 * liblzma: Fixed the use of presets in threaded encoder
2119 * xz --block-list and --block-size can now be used together
2120 in single-threaded mode. Previously the combination only
2121 worked in multi-threaded mode.
2123 * Added support for LZMA_IGNORE_CHECK to liblzma and made it
2124 available in xz as --ignore-check.
2126 * liblzma speed optimizations:
2128 - Initialization of a new LZMA1 or LZMA2 encoder has been
2129 optimized. (The speed of reinitializing an already-allocated
2130 encoder isn't affected.) This helps when compressing many
2131 small buffers with lzma_stream_buffer_encode() and other
2132 similar situations where an already-allocated encoder state
2133 isn't reused. This speed-up is visible in xz too if one
2134 compresses many small files one at a time instead running xz
2135 once and giving all files as command-line arguments.
2137 - Buffer comparisons are now much faster when unaligned access
2138 is allowed (configured with --enable-unaligned-access). This
2139 speeds up encoding significantly. There is arch-specific code
2140 for 32-bit and 64-bit x86 (32-bit needs SSE2 for the best
2141 results and there's no run-time CPU detection for now).
2142 For other archs there is only generic code which probably
2143 isn't as optimal as arch-specific solutions could be.
2145 - A few speed optimizations were made to the SHA-256 code.
2146 (Note that the builtin SHA-256 code isn't used on all
2149 * liblzma can now be built with MSVC 2013 update 2 or later
2150 using windows/config.h.
2152 * Vietnamese translation was added.
2155 5.1.3alpha (2013-10-26)
2157 * All fixes from 5.0.5
2161 - Fixed a deadlock in the threaded encoder.
2163 - Made the uses of lzma_allocator const correct.
2165 - Added lzma_block_uncomp_encode() to create uncompressed
2166 .xz Blocks using LZMA2 uncompressed chunks.
2168 - Added support for native threads on Windows and the ability
2169 to detect the number of CPU cores.
2173 - Fixed a race condition in the signal handling. It was
2174 possible that e.g. the first SIGINT didn't make xz exit
2175 if reading or writing blocked and one had bad luck. The fix
2176 is non-trivial, so as of writing it is unknown if it will be
2177 backported to the v5.0 branch.
2179 - Made the progress indicator work correctly in threaded mode.
2181 - Threaded encoder now works together with --block-list=SIZES.
2183 - Added preliminary support for --flush-timeout=TIMEOUT.
2184 It can be useful for (somewhat) real-time streaming. For
2185 now the decompression side has to be done with something
2186 else than the xz tool due to how xz does buffering, but this
2190 5.1.2alpha (2012-07-04)
2192 * All fixes from 5.0.3 and 5.0.4
2196 - Fixed a deadlock and an invalid free() in the threaded encoder.
2198 - Added support for symbol versioning. It is enabled by default
2199 on GNU/Linux, other GNU-based systems, and FreeBSD.
2201 - Use SHA-256 implementation from the operating system if one is
2202 available in libc, libmd, or libutil. liblzma won't use e.g.
2203 OpenSSL or libgcrypt to avoid introducing new dependencies.
2205 - Fixed liblzma.pc for static linking.
2207 - Fixed a few portability bugs.
2209 * xz --decompress --single-stream now fixes the input position after
2210 successful decompression. Now the following works:
2212 echo foo | xz > foo.xz
2213 echo bar | xz >> foo.xz
2214 ( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
2216 Note that it doesn't work if the input is not seekable
2217 or if there is Stream Padding between the concatenated
2220 * xz -lvv now shows the minimum xz version that is required to
2221 decompress the file. Currently it is 5.0.0 for all supported .xz
2222 files except files with empty LZMA2 streams require 5.0.2.
2224 * Added an *incomplete* implementation of --block-list=SIZES to xz.
2225 It only works correctly in single-threaded mode and when
2226 --block-size isn't used at the same time. --block-list allows
2227 specifying the sizes of Blocks which can be useful e.g. when
2228 creating files for random-access reading.
2231 5.1.1alpha (2011-04-12)
2233 * All fixes from 5.0.2
2235 * liblzma fixes that will also be included in 5.0.3:
2237 - A memory leak was fixed.
2239 - lzma_stream_buffer_encode() no longer creates an empty .xz
2240 Block if encoding an empty buffer. Such an empty Block with
2241 LZMA2 data would trigger a bug in 5.0.1 and older (see the
2242 first bullet point in 5.0.2 notes). When releasing 5.0.2,
2243 I thought that no encoder creates this kind of files but
2246 - Validate function arguments better in a few functions. Most
2247 importantly, specifying an unsupported integrity check to
2248 lzma_stream_buffer_encode() no longer creates a corrupt .xz
2249 file. Probably no application tries to do that, so this
2250 shouldn't be a big problem in practice.
2252 - Document that lzma_block_buffer_encode(),
2253 lzma_easy_buffer_encode(), lzma_stream_encoder(), and
2254 lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
2256 - The return values of the _memusage() functions are now
2259 * Support for multithreaded compression was added using the simplest
2260 method, which splits the input data into blocks and compresses
2261 them independently. Other methods will be added in the future.
2262 The current method has room for improvement, e.g. it is possible
2263 to reduce the memory usage.
2265 * Added the options --single-stream and --block-size=SIZE to xz.
2267 * xzdiff and xzgrep now support .lzo files if lzop is installed.
2268 The .tzo suffix is also recognized as a shorthand for .tar.lzo.
2270 * Support for short 8.3 filenames under DOS was added to xz. It is
2271 experimental and may change before it gets into a stable release.
2276 * Fixed an old bug in xzgrep that affected OpenBSD and probably
2277 a few other operating systems too.
2279 * Updated French and German translations.
2281 * Added support for detecting the amount of RAM on AmigaOS/AROS.
2283 * Minor build system updates.
2288 * Fix regressions introduced in 5.0.6:
2290 - Fix building with non-GNU make.
2292 - Fix invalid Libs.private value in liblzma.pc which broke
2293 static linking against liblzma if the linker flags were
2294 taken from pkg-config.
2299 * xzgrep now exits with status 0 if at least one file matched.
2301 * A few minor portability and build system fixes
2306 * lzmadec and liblzma's lzma_alone_decoder(): Support decompressing
2307 .lzma files that have less common settings in the headers
2308 (dictionary size other than 2^n or 2^n + 2^(n-1), or uncompressed
2309 size greater than 256 GiB). The limitations existed to avoid false
2310 positives when detecting .lzma files. The lc + lp <= 4 limitation
2311 still remains since liblzma's LZMA decoder has that limitation.
2313 NOTE: xz's .lzma support or liblzma's lzma_auto_decoder() are NOT
2314 affected by this change. They still consider uncommon .lzma headers
2315 as not being in the .lzma format. Changing this would give way too
2316 many false positives.
2320 - Interaction of preset and custom filter chain options was
2321 made less illogical. This affects only certain less typical
2322 uses cases so few people are expected to notice this change.
2324 Now when a custom filter chain option (e.g. --lzma2) is
2325 specified, all preset options (-0 ... -9, -e) earlier are on
2326 the command line are completely forgotten. Similarly, when
2327 a preset option is specified, all custom filter chain options
2328 earlier on the command line are completely forgotten.
2330 Example 1: "xz -9 --lzma2=preset=5 -e" is equivalent to "xz -e"
2331 which is equivalent to "xz -6e". Earlier -e didn't put xz back
2332 into preset mode and thus the example command was equivalent
2333 to "xz --lzma2=preset=5".
2335 Example 2: "xz -9e --lzma2=preset=5 -7" is equivalent to
2336 "xz -7". Earlier a custom filter chain option didn't make
2337 xz forget the -e option so the example was equivalent to
2340 - Fixes and improvements to error handling.
2342 - Various fixes to the man page.
2344 * xzless: Fixed to work with "less" versions 448 and later.
2346 * xzgrep: Made -h an alias for --no-filename.
2348 * Include the previously missing debug/translation.bash which can
2349 be useful for translators.
2351 * Include a build script for Mac OS X. This has been in the Git
2352 repository since 2010 but due to a mistake in Makefile.am the
2353 script hasn't been included in a release tarball before.
2360 - Fix lzma_index_init(). It could crash if memory allocation
2363 - Fix the possibility of an incorrect LZMA_BUF_ERROR when a BCJ
2364 filter is used and the application only provides exactly as
2365 much output space as is the uncompressed size of the file.
2367 - Fix a bug in doc/examples_old/xz_pipe_decompress.c. It didn't
2368 check if the last call to lzma_code() really returned
2369 LZMA_STREAM_END, which made the program think that truncated
2372 - New example programs in doc/examples (old programs are now in
2373 doc/examples_old). These have more comments and more detailed
2376 * Fix "xz -lvv foo.xz". It could crash on some corrupted files.
2378 * Fix output of "xz --robot -lv" and "xz --robot -lvv" which
2379 incorrectly printed the filename also in the "foo (x/x)" format.
2381 * Fix exit status of "xzdiff foo.xz bar.xz".
2383 * Fix exit status of "xzgrep foo binary_file".
2385 * Fix portability to EBCDIC systems.
2387 * Fix a configure issue on AIX with the XL C compiler. See INSTALL
2390 * Update French, German, Italian, and Polish translations.
2397 - A memory leak was fixed.
2399 - lzma_stream_buffer_encode() no longer creates an empty .xz
2400 Block if encoding an empty buffer. Such an empty Block with
2401 LZMA2 data would trigger a bug in 5.0.1 and older (see the
2402 first bullet point in 5.0.2 notes). When releasing 5.0.2,
2403 I thought that no encoder creates this kind of files but
2406 - Validate function arguments better in a few functions. Most
2407 importantly, specifying an unsupported integrity check to
2408 lzma_stream_buffer_encode() no longer creates a corrupt .xz
2409 file. Probably no application tries to do that, so this
2410 shouldn't be a big problem in practice.
2412 - Document that lzma_block_buffer_encode(),
2413 lzma_easy_buffer_encode(), lzma_stream_encoder(), and
2414 lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
2416 - The return values of the _memusage() functions are now
2419 * Fix command name detection in xzgrep. xzegrep and xzfgrep now
2420 correctly use egrep and fgrep instead of grep.
2422 * French translation was added.
2427 * LZMA2 decompressor now correctly accepts LZMA2 streams with no
2428 uncompressed data. Previously it considered them corrupt. The
2429 bug can affect applications that use raw LZMA2 streams. It is
2430 very unlikely to affect .xz files because no compressor creates
2431 .xz files with empty LZMA2 streams. (Empty .xz files are a
2432 different thing than empty LZMA2 streams.)
2434 * "xz --suffix=.foo filename.foo" now refuses to compress the
2435 file due to it already having the suffix .foo. It was already
2436 documented on the man page, but the code lacked the test.
2438 * "xzgrep -l foo bar.xz" works now.
2440 * Polish translation was added.
2445 * xz --force now (de)compresses files that have setuid, setgid,
2446 or sticky bit set and files that have multiple hard links.
2447 The man page had it documented this way already, but the code
2450 * gzip and bzip2 support in xzdiff was fixed.
2454 * Minor fix to Czech translation
2459 Only the most important changes compared to 4.999.9beta are listed
2460 here. One change is especially important:
2462 * The memory usage limit is now disabled by default. Some scripts
2463 written before this change may have used --memory=max on xz command
2464 line or in XZ_OPT. THESE USES OF --memory=max SHOULD BE REMOVED
2465 NOW, because they interfere with user's ability to set the memory
2466 usage limit himself. If user-specified limit causes problems to
2467 your script, blame the user.
2469 Other significant changes:
2471 * Added support for XZ_DEFAULTS environment variable. This variable
2472 allows users to set default options for xz, e.g. default memory
2473 usage limit or default compression level. Scripts that use xz
2474 must never set or unset XZ_DEFAULTS. Scripts should use XZ_OPT
2475 instead if they need a way to pass options to xz via an
2476 environment variable.
2478 * The compression settings associated with the preset levels
2479 -0 ... -9 have been changed. --extreme was changed a little too.
2480 It is now less likely to make compression worse, but with some
2481 files the new --extreme may compress slightly worse than the old
2484 * If a preset level (-0 ... -9) is specified after a custom filter
2485 chain options have been used (e.g. --lzma2), the custom filter
2486 chain will be forgotten. Earlier the preset options were
2487 completely ignored after custom filter chain options had been
2490 * xz will create sparse files when decompressing if the uncompressed
2491 data contains long sequences of binary zeros. This is done even
2492 when writing to standard output that is connected to a regular
2493 file and certain additional conditions are met to make it safe.
2495 * Support for "xz --list" was added. Combine with --verbose or
2496 --verbose --verbose (-vv) for detailed output.
2498 * I had hoped that liblzma API would have been stable after
2499 4.999.9beta, but there have been a couple of changes in the
2500 advanced features, which don't affect most applications:
2502 - Index handling code was revised. If you were using the old
2503 API, you will get a compiler error (so it's easy to notice).
2505 - A subtle but important change was made to the Block handling
2506 API. lzma_block.version has to be initialized even for
2507 lzma_block_header_decode(). Code that doesn't do it will work
2508 for now, but might break in the future, which makes this API
2509 change easy to miss.
2511 * The major soname has been bumped to 5.0.0. liblzma API and ABI
2512 are now stable, so the need to recompile programs linking against
2513 liblzma shouldn't arise soon.