Add NEWS for 5.4.6.
[xz.git] / NEWS
blobd271dad2d3f1ec54e56ef8fa60275a88697a24aa
2 XZ Utils Release Notes
3 ======================
5 5.4.6 (2024-01-26)
7     * Fixed a bug involving internal function pointers in liblzma not
8       being initialized to NULL. The bug can only be triggered if
9       lzma_filters_update() is called on a LZMA1 encoder, so it does
10       not affect xz or any application known to us that uses liblzma.
12     * xz:
14         - Fixed a regression introduced in 5.4.2 that caused encoding
15           in the raw format to unnecessarily fail if --suffix was not
16           used. For instance, the following command no longer reports
17           that --suffix must be used:
19               echo foo | xz --format=raw --lzma2 | wc -c
21         - Fixed an issue on MinGW-w64 builds that prevented reading
22           from or writing to non-terminal character devices like NUL.
24     * Added a new test.
27 5.4.5 (2023-11-31)
29     * liblzma:
31         - Use __attribute__((__no_sanitize_address__)) to avoid address
32           sanitization with CRC64 CLMUL. It uses 16-byte-aligned reads
33           which can extend past the bounds of the input buffer and
34           inherently trigger address sanitization errors. This isn't
35           a bug.
37         - Fixed an assertion failure that could be triggered by a large
38           unpadded_size argument. It was verified that there was no
39           other bug than the assertion failure.
41         - Fixed a bug that prevented building with Windows Vista
42           threading when __attribute__((__constructor__)) is not
43           supported.
45     * xz now properly handles special files such as "con" or "nul" on
46       Windows. Before this fix, the following wrote "foo" to the
47       console and deleted the input file "con_xz":
49           echo foo | xz > con_xz
50           xz --suffix=_xz --decompress con_xz
52     * Build systems:
54         - Allow builds with Windows win95 threading and small mode when
55           __attribute__((__constructor__)) is supported.
57         - Added a new line to liblzma.pc for MSYS2 (Windows):
59               Cflags.private: -DLZMA_API_STATIC
61           When compiling code that will link against static liblzma,
62           the LZMA_API_STATIC macro needs to be defined on Windows.
64         - CMake specific changes:
66             * Fixed a bug that allowed CLOCK_MONOTONIC to be used even
67               if the check for it failed.
69             * Fixed a bug where configuring CMake multiple times
70               resulted in HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC
71               not being set.
73             * Fixed the build with MinGW-w64-based Clang/LLVM 17.
74               llvm-windres now has more accurate GNU windres emulation
75               so the GNU windres workaround from 5.4.1 is needed with
76               llvm-windres version 17 too.
78             * The import library on Windows is now properly named
79               "liblzma.dll.a" instead of "libliblzma.dll.a"
81             * Fixed a bug causing the Ninja Generator to fail on
82               UNIX-like systems. This bug was introduced in 5.4.0.
84             * Added a new option to disable CLMUL CRC64.
86             * A module-definition (.def) file is now created when
87               building liblzma.dll with MinGW-w64.
89             * The pkg-config liblzma.pc file is now installed on all
90               builds except when using MSVC on Windows.
92             * Added large file support by default for platforms that
93               need it to handle files larger than 2 GiB. This includes
94               MinGW-w64, even 64-bit builds.
96     * Small fixes and improvements to the tests.
98     * Updated translations: Chinese (simplified) and Esperanto.
101 5.4.4 (2023-08-02)
103     * liblzma and xzdec can now build against WASI SDK when threading
104       support is disabled. xz and tests don't build yet.
106     * CMake:
108         - Fixed a bug preventing other projects from including liblzma
109           multiple times using find_package().
111         - Don't create broken symlinks in Cygwin and MSYS2 unless
112           supported by the environment. This prevented building for the
113           default MSYS2 environment. The problem was introduced in
114           xz 5.4.0.
116     * Documentation:
118         - Small improvements to man pages.
120         - Small improvements and typo fixes for liblzma API
121           documentation.
123     * Tests:
125         - Added a new section to INSTALL to describe basic test usage
126           and address recent questions about building the tests when
127           cross compiling.
129         - Small fixes and improvements to the tests.
131     * Translations:
133         - Fixed a mistake that caused one of the error messages to not
134           be translated. This only affected versions 5.4.2 and 5.4.3.
136         - Updated the Chinese (simplified), Croatian, Esperanto, German,
137           Korean, Polish, Romanian, Spanish, Swedish, Ukrainian, and
138           Vietnamese translations.
140         - Updated the German, Korean, Romanian, and Ukrainian man page
141           translations.
144 5.4.3 (2023-05-04)
146     * All fixes from 5.2.12
148     * Features in the CMake build can now be disabled as CMake cache
149       variables, similar to the Autotools build.
151     * Minor update to the Croatian translation.
154 5.4.2 (2023-03-18)
156     * All fixes from 5.2.11 that were not included in 5.4.1.
158     * If xz is built with support for the Capsicum sandbox but running
159       in an environment that doesn't support Capsicum, xz now runs
160       normally without sandboxing instead of exiting with an error.
162     * liblzma:
164         - Documentation was updated to improve the style, consistency,
165           and completeness of the liblzma API headers.
167         - The Doxygen-generated HTML documentation for the liblzma API
168           header files is now included in the source release and is
169           installed as part of "make install". All JavaScript is
170           removed to simplify license compliance and to reduce the
171           install size.
173         - Fixed a minor bug in lzma_str_from_filters() that produced
174           too many filters in the output string instead of reporting
175           an error if the input array had more than four filters. This
176           bug did not affect xz.
178     * Build systems:
180         - autogen.sh now invokes the doxygen tool via the new wrapper
181           script doxygen/update-doxygen, unless the command line option
182           --no-doxygen is used.
184         - Added microlzma_encoder.c and microlzma_decoder.c to the
185           VS project files for Windows and to the CMake build. These
186           should have been included in 5.3.2alpha.
188     * Tests:
190         - Added a test to the CMake build that was forgotten in the
191           previous release.
193         - Added and refactored a few tests.
195     * Translations:
197         - Updated the Brazilian Portuguese translation.
199         - Added Brazilian Portuguese man page translation.
202 5.4.1 (2023-01-11)
204     * liblzma:
206         - Fixed the return value of lzma_microlzma_encoder() if the
207           LZMA options lc/lp/pb are invalid. Invalid lc/lp/pb options
208           made the function return LZMA_STREAM_END without encoding
209           anything instead of returning LZMA_OPTIONS_ERROR.
211         - Windows / Visual Studio: Workaround a possible compiler bug
212           when targeting 32-bit x86 and compiling the CLMUL version of
213           the CRC64 code. The CLMUL code isn't enabled by the Windows
214           project files but it is in the CMake-based builds.
216     * Build systems:
218         - Windows-specific CMake changes:
220             * Don't try to enable CLMUL CRC64 code if _mm_set_epi64x()
221               isn't available. This fixes CMake-based build with Visual
222               Studio 2013.
224             * Created a workaround for a build failure with windres
225               from GNU binutils. It is used only when the C compiler
226               is GCC (not Clang). The workaround is incompatible
227               with llvm-windres, resulting in "XZx20Utils" instead
228               of "XZ Utils" in the resource file, but without the
229               workaround llvm-windres works correctly. See the
230               comment in CMakeLists.txt for details.
232             * Included the resource files in the xz and xzdec build
233               rules. Building the command line tools is still
234               experimental but possible with MinGW-w64.
236         - Visual Studio: Added stream_decoder_mt.c to the project
237           files. Now the threaded decompressor lzma_stream_decoder_mt()
238           gets built. CMake-based build wasn't affected.
240         - Updated windows/INSTALL-MSVC.txt to mention that CMake-based
241           build is now the preferred method with Visual Studio. The
242           project files will probably be removed after 5.4.x releases.
244         - Changes to #defines in config.h:
246             * HAVE_DECL_CLOCK_MONOTONIC was replaced by
247               HAVE_CLOCK_MONOTONIC. The old macro was always defined
248               in configure-generated config.h to either 0 or 1. The
249               new macro is defined (to 1) only if the declaration of
250               CLOCK_MONOTONIC is available. This matches the way most
251               other config.h macros work and makes things simpler with
252               other build systems.
254             * HAVE_DECL_PROGRAM_INVOCATION_NAME was replaced by
255               HAVE_PROGRAM_INVOCATION_NAME for the same reason.
257     * Tests:
259         - Fixed test script compatibility with ancient /bin/sh
260           versions. Now the five test_compress_* tests should
261           no longer fail on Solaris 10.
263         - Added and refactored a few tests.
265     * Translations:
267         - Updated the Catalan and Esperanto translations.
269         - Added Korean and Ukrainian man page translations.
272 5.4.0 (2022-12-13)
274     This bumps the minor version of liblzma because new features were
275     added. The API and ABI are still backward compatible with liblzma
276     5.2.x and 5.0.x.
278     Since 5.3.5beta:
280     * All fixes from 5.2.10.
282     * The ARM64 filter is now stable. The xz option is now --arm64.
283       Decompression requires XZ Utils 5.4.0. In the future the ARM64
284       filter will be supported by XZ for Java, XZ Embedded (including
285       the version in Linux), LZMA SDK, and 7-Zip.
287     * Translations:
289         - Updated Catalan, Croatian, German, Romanian, and Turkish
290           translations.
292         - Updated German man page translations.
294         - Added Romanian man page translations.
296     Summary of new features added in the 5.3.x development releases:
298     * liblzma:
300         - Added threaded .xz decompressor lzma_stream_decoder_mt().
301           It can use multiple threads with .xz files that have multiple
302           Blocks with size information in Block Headers. The threaded
303           encoder in xz has always created such files.
305           Single-threaded encoder cannot store the size information in
306           Block Headers even if one used LZMA_FULL_FLUSH to create
307           multiple Blocks, so this threaded decoder cannot use multiple
308           threads with such files.
310           If there are multiple Streams (concatenated .xz files), one
311           Stream will be decompressed completely before starting the
312           next Stream.
314         - A new decoder flag LZMA_FAIL_FAST was added. It makes the
315           threaded decompressor report errors soon instead of first
316           flushing all pending data before the error location.
318         - New Filter IDs:
319             * LZMA_FILTER_ARM64 is for ARM64 binaries.
320             * LZMA_FILTER_LZMA1EXT is for raw LZMA1 streams that don't
321               necessarily use the end marker.
323         - Added lzma_str_to_filters(), lzma_str_from_filters(), and
324           lzma_str_list_filters() to convert a preset or a filter chain
325           string to a lzma_filter[] and vice versa. These should make
326           it easier to write applications that allow users to specify
327           custom compression options.
329         - Added lzma_filters_free() which can be convenient for freeing
330           the filter options in a filter chain (an array of lzma_filter
331           structures).
333         - lzma_file_info_decoder() to makes it a little easier to get
334           the Index field from .xz files. This helps in getting the
335           uncompressed file size but an easy-to-use random access
336           API is still missing which has existed in XZ for Java for
337           a long time.
339         - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
340           It is used by erofs-utils and may be used by others too.
342           The MicroLZMA format is a raw LZMA stream (without end marker)
343           whose first byte (always 0x00) has been replaced with
344           bitwise-negation of the LZMA properties (lc/lp/pb). It was
345           created for use in EROFS but may be used in other contexts
346           as well where it is important to avoid wasting bytes for
347           stream headers or footers. The format is also supported by
348           XZ Embedded (the XZ Embedded version in Linux got MicroLZMA
349           support in Linux 5.16).
351           The MicroLZMA encoder API in liblzma can compress into a
352           fixed-sized output buffer so that as much data is compressed
353           as can be fit into the buffer while still creating a valid
354           MicroLZMA stream. This is needed for EROFS.
356         - Added lzma_lzip_decoder() to decompress the .lz (lzip) file
357           format version 0 and the original unextended version 1 files.
358           Also lzma_auto_decoder() supports .lz files.
360         - lzma_filters_update() can now be used with the multi-threaded
361           encoder (lzma_stream_encoder_mt()) to change the filter chain
362           after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
364         - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
365           finders that require at least 3 or 4. Now it is internally
366           rounded up if needed.
368         - CLMUL-based CRC64 on x86-64 and E2K with runtime processor
369           detection. On 32-bit x86 it currently isn't available unless
370           --disable-assembler is used which can make the non-CLMUL
371           CRC64 slower; this might be fixed in the future.
373         - Building with --disable-threads --enable-small
374           is now thread-safe if the compiler supports
375           __attribute__((__constructor__)).
377     * xz:
379         - Using -T0 (--threads=0) will now use multi-threaded encoder
380           even on a single-core system. This is to ensure that output
381           from the same xz binary is identical on both single-core and
382           multi-core systems.
384         - --threads=+1 or -T+1 is now a way to put xz into
385           multi-threaded mode while using only one worker thread.
386           The + is ignored if the number is not 1.
388         - A default soft memory usage limit is now used for compression
389           when -T0 is used and no explicit limit has been specified.
390           This soft limit is used to restrict the number of threads
391           but if the limit is exceeded with even one thread then xz
392           will continue with one thread using the multi-threaded
393           encoder and this limit is ignored. If the number of threads
394           is specified manually then no default limit will be used;
395           this affects only -T0.
397           This change helps on systems that have very many cores and
398           using all of them for xz makes no sense. Previously xz -T0
399           could run out of memory on such systems because it attempted
400           to reserve memory for too many threads.
402           This also helps with 32-bit builds which don't have a large
403           amount of address space that would be required for many
404           threads. The default soft limit for -T0 is at most 1400 MiB
405           on all 32-bit platforms.
407         - Previously a low value in --memlimit-compress wouldn't cause
408           xz to switch from multi-threaded mode to single-threaded mode
409           if the limit cannot otherwise be met; xz failed instead. Now
410           xz can switch to single-threaded mode and then, if needed,
411           scale down the LZMA2 dictionary size too just like it already
412           did when it was started in single-threaded mode.
414         - The option --no-adjust no longer prevents xz from scaling down
415           the number of threads as that doesn't affect the compressed
416           output (only performance). Now --no-adjust only prevents
417           adjustments that affect compressed output, that is, with
418           --no-adjust xz won't switch from multi-threaded mode to
419           single-threaded mode and won't scale down the LZMA2
420           dictionary size.
422         - Added a new option --memlimit-mt-decompress=LIMIT. This is
423           used to limit the number of decompressor threads (possibly
424           falling back to single-threaded mode) but it will never make
425           xz refuse to decompress a file. This has a system-specific
426           default value because without any limit xz could end up
427           allocating memory for the whole compressed input file, the
428           whole uncompressed output file, multiple thread-specific
429           decompressor instances and so on. Basically xz could
430           attempt to use an insane amount of memory even with fairly
431           common files. The system-specific default value is currently
432           the same as the one used for compression with -T0.
434           The new option works together with the existing option
435           --memlimit-decompress=LIMIT. The old option sets a hard limit
436           that must not be exceeded (xz will refuse to decompress)
437           while the new option only restricts the number of threads.
438           If the limit set with --memlimit-mt-decompress is greater
439           than the limit set with --memlimit-compress, then the latter
440           value is used also for --memlimit-mt-decompress.
442         - Added new information to the output of xz --info-memory and
443           new fields to the output of xz --robot --info-memory.
445         - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
446           now that liblzma handles it.
448         - Don't mention endianness for ARM and ARM-Thumb filters in
449           --long-help. The filters only work for little endian
450           instruction encoding but modern ARM processors using
451           big endian data access still use little endian
452           instruction encoding. So the help text was misleading.
453           In contrast, the PowerPC filter is only for big endian
454           32/64-bit PowerPC code. Little endian PowerPC would need
455           a separate filter.
457         - Added decompression support for the .lz (lzip) file format
458           version 0 and the original unextended version 1. It is
459           autodetected by default. See also the option --format on
460           the xz man page.
462         - Sandboxing enabled by default:
463             * Capsicum (FreeBSD)
464             * pledge(2) (OpenBSD)
466     * Scripts now support the .lz format using xz.
468     * A few new tests were added.
470     * The liblzma-specific tests are now supported in CMake-based
471       builds too ("make test").
474 5.3.5beta (2022-12-01)
476     * All fixes from 5.2.9.
478     * liblzma:
480         - Added new LZMA_FILTER_LZMA1EXT for raw encoder and decoder to
481           handle raw LZMA1 streams that don't have end of payload marker
482           (EOPM) alias end of stream (EOS) marker. It can be used in
483           filter chains, for example, with the x86 BCJ filter.
485         - Added lzma_str_to_filters(), lzma_str_from_filters(), and
486           lzma_str_list_filters() to make it easier for applications
487           to get custom compression options from a user and convert
488           it to an array of lzma_filter structures.
490         - Added lzma_filters_free().
492         - lzma_filters_update() can now be used with the multi-threaded
493           encoder (lzma_stream_encoder_mt()) to change the filter chain
494           after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
496         - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
497           finders that require at least 3 or 4. Now it is internally
498           rounded up if needed.
500         - ARM64 filter was modified. It is still experimental.
502         - Fixed LTO build with Clang if -fgnuc-version=10 or similar
503           was used to make Clang look like GCC >= 10. Now it uses
504           __has_attribute(__symver__) which should be reliable.
506     * xz:
508         - --threads=+1 or -T+1 is now a way to put xz into multi-threaded
509           mode while using only one worker thread.
511         - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
512           now that liblzma handles it.
514     * Updated translations: Chinese (simplified), Korean, and Turkish.
517 5.3.4alpha (2022-11-15)
519     * All fixes from 5.2.7 and 5.2.8.
521     * liblzma:
523         - Minor improvements to the threaded decoder.
525         - Added CRC64 implementation that uses SSSE3, SSE4.1, and CLMUL
526           instructions on 32/64-bit x86 and E2K. On 32-bit x86 it's
527           not enabled unless --disable-assembler is used but then
528           the non-CLMUL code might be slower. Processor support is
529           detected at runtime so this is built by default on x86-64
530           and E2K. On these platforms, if compiler flags indicate
531           unconditional CLMUL support (-msse4.1 -mpclmul) then the
532           generic version is not built, making liblzma 8-9 KiB smaller
533           compared to having both versions included.
535           With extremely compressible files this can make decompression
536           up to twice as fast but with typical files 5 % improvement
537           is a more realistic expectation.
539           The CLMUL version is slower than the generic version with
540           tiny inputs (especially at 1-8 bytes per call, but up to
541           16 bytes). In normal use in xz this doesn't matter at all.
543         - Added an experimental ARM64 filter. This is *not* the final
544           version! Files created with this experimental version won't
545           be supported in the future versions! The filter design is
546           a compromise where improving one use case makes some other
547           cases worse.
549         - Added decompression support for the .lz (lzip) file format
550           version 0 and the original unextended version 1. See the
551           API docs of lzma_lzip_decoder() for details. Also
552           lzma_auto_decoder() supports .lz files.
554         - Building with --disable-threads --enable-small
555           is now thread-safe if the compiler supports
556           __attribute__((__constructor__))
558     * xz:
560         - Added support for OpenBSD's pledge(2) as a sandboxing method.
562         - Don't mention endianness for ARM and ARM-Thumb filters in
563           --long-help. The filters only work for little endian
564           instruction encoding but modern ARM processors using
565           big endian data access still use little endian
566           instruction encoding. So the help text was misleading.
567           In contrast, the PowerPC filter is only for big endian
568           32/64-bit PowerPC code. Little endian PowerPC would need
569           a separate filter.
571         - Added --experimental-arm64. This will be renamed once the
572           filter is finished. Files created with this experimental
573           filter will not be supported in the future!
575         - Added new fields to the output of xz --robot --info-memory.
577         - Added decompression support for the .lz (lzip) file format
578           version 0 and the original unextended version 1. It is
579           autodetected by default. See also the option --format on
580           the xz man page.
582     * Scripts now support the .lz format using xz.
584     * Build systems:
586         - New #defines in config.h: HAVE_ENCODER_ARM64,
587           HAVE_DECODER_ARM64, HAVE_LZIP_DECODER, HAVE_CPUID_H,
588           HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR, HAVE_USABLE_CLMUL
590         - New configure options: --disable-clmul-crc,
591           --disable-microlzma, --disable-lzip-decoder, and
592           'pledge' is now an option in --enable-sandbox (but
593           it's autodetected by default anyway).
595         - INSTALL was updated to document the new configure options.
597         - PACKAGERS now lists also --disable-microlzma and
598           --disable-lzip-decoder as configure options that must
599           not be used in builds for non-embedded use.
601     * Tests:
603         - Fix some of the tests so that they skip instead of fail if
604           certain features have been disabled with configure options.
605           It's still not perfect.
607         - Other improvements to tests.
609     * Updated translations: Croatian, Finnish, Hungarian, Polish,
610       Romanian, Spanish, Swedish, and Ukrainian.
613 5.3.3alpha (2022-08-22)
615     * All fixes from 5.2.6.
617     * liblzma:
619         - Fixed 32-bit build.
621         - Added threaded .xz decompressor lzma_stream_decoder_mt().
622           It can use multiple threads with .xz files that have multiple
623           Blocks with size information in Block Headers. The threaded
624           encoder in xz has always created such files.
626           Single-threaded encoder cannot store the size information in
627           Block Headers even if one used LZMA_FULL_FLUSH to create
628           multiple Blocks, so this threaded decoder cannot use multiple
629           threads with such files.
631           If there are multiple Streams (concatenated .xz files), one
632           Stream will be decompressed completely before starting the
633           next Stream.
635         - A new decoder flag LZMA_FAIL_FAST was added. It makes the
636           threaded decompressor report errors soon instead of first
637           flushing all pending data before the error location.
639     * xz:
641         - Using -T0 (--threads=0) will now use multi-threaded encoder
642           even on a single-core system. This is to ensure that output
643           from the same xz binary is identical on both single-core and
644           multi-core systems.
646         - A default soft memory usage limit is now used for compression
647           when -T0 is used and no explicit limit has been specified.
648           This soft limit is used to restrict the number of threads
649           but if the limit is exceeded with even one thread then xz
650           will continue with one thread using the multi-threaded
651           encoder and this limit is ignored. If the number of threads
652           is specified manually then no default limit will be used;
653           this affects only -T0.
655           This change helps on systems that have very many cores and
656           using all of them for xz makes no sense. Previously xz -T0
657           could run out of memory on such systems because it attempted
658           to reserve memory for too many threads.
660           This also helps with 32-bit builds which don't have a large
661           amount of address space that would be required for many
662           threads. The default limit is 1400 MiB on all 32-bit
663           platforms with -T0.
665           Now xz -T0 should just work. It might use too few threads
666           in some cases but at least it shouldn't easily run out of
667           memory. It's possible that this will be tweaked before 5.4.0.
669         - Changes to --memlimit-compress and --no-adjust:
671           In single-threaded mode, --memlimit-compress can make xz
672           scale down the LZMA2 dictionary size to meet the memory usage
673           limit. This obviously affects the compressed output. However,
674           if xz was in threaded mode, --memlimit-compress could make xz
675           reduce the number of threads but it wouldn't make xz switch
676           from multi-threaded mode to single-threaded mode or scale
677           down the LZMA2 dictionary size. This seemed illogical.
679           Now --memlimit-compress can make xz switch to single-threaded
680           mode if one thread in multi-threaded mode uses too much
681           memory. If memory usage is still too high, then the LZMA2
682           dictionary size can be scaled down too.
684           The option --no-adjust was also changed so that it no longer
685           prevents xz from scaling down the number of threads as that
686           doesn't affect compressed output (only performance). After
687           this commit --no-adjust only prevents adjustments that affect
688           compressed output, that is, with --no-adjust xz won't switch
689           from multithreaded mode to single-threaded mode and won't
690           scale down the LZMA2 dictionary size.
692         - Added a new option --memlimit-mt-decompress=LIMIT. This is
693           used to limit the number of decompressor threads (possibly
694           falling back to single-threaded mode) but it will never make
695           xz refuse to decompress a file. This has a system-specific
696           default value because without any limit xz could end up
697           allocating memory for the whole compressed input file, the
698           whole uncompressed output file, multiple thread-specific
699           decompressor instances and so on. Basically xz could
700           attempt to use an insane amount of memory even with fairly
701           common files.
703           The new option works together with the existing option
704           --memlimit-decompress=LIMIT. The old option sets a hard limit
705           that must not be exceeded (xz will refuse to decompress)
706           while the new option only restricts the number of threads.
707           If the limit set with --memlimit-mt-decompress is greater
708           than the limit set with --memlimit-compress, then the latter
709           value is used also for --memlimit-mt-decompress.
711     * Tests:
713         - Added a few more tests.
715         - Added tests/code_coverage.sh to create a code coverage report
716           of the tests.
718     * Build systems:
720         - Automake's parallel test harness is now used to make tests
721           finish faster.
723         - Added the CMake files to the distribution tarball. These were
724           supposed to be in 5.2.5 already.
726         - Added liblzma tests to the CMake build.
728         - Windows: Fix building of liblzma.dll with the included
729           Visual Studio project files.
732 5.3.2alpha (2021-10-28)
734     This release was made on short notice so that recent erofs-utils can
735     be built with LZMA support without needing a snapshot from xz.git.
736     Thus many pending things were not included, not even updated
737     translations (which would need to be updated for the new --list
738     strings anyway).
740     * All fixes from 5.2.5.
742     * xz:
744         - When copying metadata from the source file to the destination
745           file, don't try to set the group (GID) if it is already set
746           correctly. This avoids a failure on OpenBSD (and possibly on
747           a few other OSes) where files may get created so that their
748           group doesn't belong to the user, and fchown(2) can fail even
749           if it needs to do nothing.
751         - The --keep option now accepts symlinks, hardlinks, and
752           setuid, setgid, and sticky files. Previously this required
753           using --force.
755         - Split the long strings used in --list and --info-memory modes
756           to make them much easier for translators.
758         - If built with sandbox support and enabling the sandbox fails,
759           xz will now immediately exit with exit status of 1. Previously
760           it would only display a warning if -vv was used.
762         - Cap --memlimit-compress to 2000 MiB on MIPS32 because on
763           MIPS32 userspace processes are limited to 2 GiB of address
764           space.
766     * liblzma:
768         - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
769           The API is in lzma/container.h.
771           The MicroLZMA format is a raw LZMA stream (without end marker)
772           whose first byte (always 0x00) has been replaced with
773           bitwise-negation of the LZMA properties (lc/lp/pb). It was
774           created for use in EROFS but may be used in other contexts
775           as well where it is important to avoid wasting bytes for
776           stream headers or footers. The format is also supported by
777           XZ Embedded.
779           The MicroLZMA encoder API in liblzma can compress into a
780           fixed-sized output buffer so that as much data is compressed
781           as can be fit into the buffer while still creating a valid
782           MicroLZMA stream. This is needed for EROFS.
784         - Added fuzzing support.
786         - Support Intel Control-flow Enforcement Technology (CET) in
787           32-bit x86 assembly files.
789         - Visual Studio: Use non-standard _MSVC_LANG to detect C++
790           standard version in the lzma.h API header. It's used to
791           detect when "noexcept" can be used.
793     * Scripts:
795         - Fix exit status of xzdiff/xzcmp. Exit status could be 2 when
796           the correct value is 1.
798         - Fix exit status of xzgrep.
800         - Detect corrupt .bz2 files in xzgrep.
802         - Add zstd support to xzgrep and xzdiff/xzcmp.
804         - Fix less(1) version detection in xzless. It failed if the
805           version number from "less -V" contained a dot.
807     * Fix typos and technical issues in man pages.
809     * Build systems:
811         - Windows: Fix building of resource files when config.h isn't
812           used. CMake + Visual Studio can now build liblzma.dll.
814         - Various fixes to the CMake support. It might still need a few
815           more fixes even for liblzma-only builds.
818 5.3.1alpha (2018-04-29)
820     * All fixes from 5.2.4.
822     * Add lzma_file_info_decoder() into liblzma and use it in xz to
823       implement the --list feature.
825     * Capsicum sandbox support is enabled by default where available
826       (FreeBSD >= 10).
829 5.2.12 (2023-05-04)
831     * Fixed a build system bug that prevented building liblzma as a
832       shared library when configured with --disable-threads. This bug
833       affected releases 5.2.6 to 5.2.11 and 5.4.0 to 5.4.2.
835     * Include <intrin.h> for Windows intrinsic functions where they are
836       needed. This fixed a bug that prevented building liblzma using
837       clang-cl on Windows.
839     * Minor update to the Croatian translation. The small change
840       applies to a string in both 5.2 and 5.4 branches.
843 5.2.11 (2023-03-18)
845     * Removed all possible cases of null pointer + 0. It is undefined
846       behavior in C99 and C17. This was detected by a sanitizer and had
847       not caused any known issues.
849     * Build systems:
851         - Added a workaround for building with GCC on MicroBlaze Linux.
852           GCC 12 on MicroBlaze doesn't support the __symver__ attribute
853           even though __has_attribute(__symver__) returns true. The
854           build is now done without the extra RHEL/CentOS 7 symbols
855           that were added in XZ Utils 5.2.7. The workaround only
856           applies to the Autotools build (not CMake).
858         - CMake: Ensure that the C compiler language is set to C99 or
859           a newer standard.
861         - CMake changes from XZ Utils 5.4.1:
863             * Added a workaround for a build failure with
864               windres from GNU binutils.
866             * Included the Windows resource files in the xz
867               and xzdec build rules.
870 5.2.10 (2022-12-13)
872     * xz: Don't modify argv[] when parsing the --memlimit* and
873       --block-list command line options. This fixes confusing
874       arguments in process listing (like "ps auxf").
876     * GNU/Linux only: Use __has_attribute(__symver__) to detect if
877       that attribute is supported. This fixes build on Mandriva where
878       Clang is patched to define __GNUC__ to 11 by default (instead
879       of 4 as used by Clang upstream).
882 5.2.9 (2022-11-30)
884     * liblzma:
886         - Fixed an infinite loop in LZMA encoder initialization
887           if dict_size >= 2 GiB. (The encoder only supports up
888           to 1536 MiB.)
890         - Fixed two cases of invalid free() that can happen if
891           a tiny allocation fails in encoder re-initialization
892           or in lzma_filters_update(). These bugs had some
893           similarities with the bug fixed in 5.2.7.
895         - Fixed lzma_block_encoder() not allowing the use of
896           LZMA_SYNC_FLUSH with lzma_code() even though it was
897           documented to be supported. The sync-flush code in
898           the Block encoder was already used internally via
899           lzma_stream_encoder(), so this was just a missing flag
900           in the lzma_block_encoder() API function.
902         - GNU/Linux only: Don't put symbol versions into static
903           liblzma as it breaks things in some cases (and even if
904           it didn't break anything, symbol versions in static
905           libraries are useless anyway). The downside of the fix
906           is that if the configure options --with-pic or --without-pic
907           are used then it's not possible to build both shared and
908           static liblzma at the same time on GNU/Linux anymore;
909           with those options --disable-static or --disable-shared
910           must be used too.
912     * New email address for bug reports is <xz@tukaani.org> which
913       forwards messages to Lasse Collin and Jia Tan.
916 5.2.8 (2022-11-13)
918     * xz:
920         - If xz cannot remove an input file when it should, this
921           is now treated as a warning (exit status 2) instead of
922           an error (exit status 1). This matches GNU gzip and it
923           is more logical as at that point the output file has
924           already been successfully closed.
926         - Fix handling of .xz files with an unsupported check type.
927           Previously such printed a warning message but then xz
928           behaved as if an error had occurred (didn't decompress,
929           exit status 1). Now a warning is printed, decompression
930           is done anyway, and exit status is 2. This used to work
931           slightly before 5.0.0. In practice this bug matters only
932           if xz has been built with some check types disabled. As
933           instructed in PACKAGERS, such builds should be done in
934           special situations only.
936         - Fix "xz -dc --single-stream tests/files/good-0-empty.xz"
937           which failed with "Internal error (bug)". That is,
938           --single-stream was broken if the first .xz stream in
939           the input file didn't contain any uncompressed data.
941         - Fix displaying file sizes in the progress indicator when
942           working in passthru mode and there are multiple input files.
943           Just like "gzip -cdf", "xz -cdf" works like "cat" when the
944           input file isn't a supported compressed file format. In
945           this case the file size counters weren't reset between
946           files so with multiple input files the progress indicator
947           displayed an incorrect (too large) value.
949     * liblzma:
951         - API docs in lzma/container.h:
952             * Update the list of decoder flags in the decoder
953               function docs.
954             * Explain LZMA_CONCATENATED behavior with .lzma files
955               in lzma_auto_decoder() docs.
957         - OpenBSD: Use HW_NCPUONLINE to detect the number of
958           available hardware threads in lzma_physmem().
960         - Fix use of wrong macro to detect x86 SSE2 support.
961           __SSE2_MATH__ was used with GCC/Clang but the correct
962           one is __SSE2__. The first one means that SSE2 is used
963           for floating point math which is irrelevant here.
964           The affected SSE2 code isn't used on x86-64 so this affects
965           only 32-bit x86 builds that use -msse2 without -mfpmath=sse
966           (there is no runtime detection for SSE2). It improves LZMA
967           compression speed (not decompression).
969         - Fix the build with Intel C compiler 2021 (ICC, not ICX)
970           on Linux. It defines __GNUC__ to 10 but doesn't support
971           the __symver__ attribute introduced in GCC 10.
973     * Scripts: Ignore warnings from xz by using --quiet --no-warn.
974       This is needed if the input .xz files use an unsupported
975       check type.
977     * Translations:
979         - Updated Croatian and Turkish translations.
981         - One new translations wasn't included because it needed
982           technical fixes. It will be in upcoming 5.4.0. No new
983           translations will be added to the 5.2.x branch anymore.
985         - Renamed the French man page translation file from
986           fr_FR.po to fr.po and thus also its install directory
987           (like /usr/share/man/fr_FR -> .../fr).
989         - Man page translations for upcoming 5.4.0 are now handled
990           in the Translation Project.
992     * Update doc/faq.txt a little so it's less out-of-date.
995 5.2.7 (2022-09-30)
997     * liblzma:
999         - Made lzma_filters_copy() to never modify the destination
1000           array if an error occurs. lzma_stream_encoder() and
1001           lzma_stream_encoder_mt() already assumed this. Before this
1002           change, if a tiny memory allocation in lzma_filters_copy()
1003           failed it would lead to a crash (invalid free() or invalid
1004           memory reads) in the cleanup paths of these two encoder
1005           initialization functions.
1007         - Added missing integer overflow check to lzma_index_append().
1008           This affects xz --list and other applications that decode
1009           the Index field from .xz files using lzma_index_decoder().
1010           Normal decompression of .xz files doesn't call this code
1011           and thus most applications using liblzma aren't affected
1012           by this bug.
1014         - Single-threaded .xz decoder (lzma_stream_decoder()): If
1015           lzma_code() returns LZMA_MEMLIMIT_ERROR it is now possible
1016           to use lzma_memlimit_set() to increase the limit and continue
1017           decoding. This was supposed to work from the beginning
1018           but there was a bug. With other decoders (.lzma or
1019           threaded .xz decoder) this already worked correctly.
1021         - Fixed accumulation of integrity check type statistics in
1022           lzma_index_cat(). This bug made lzma_index_checks() return
1023           only the type of the integrity check of the last Stream
1024           when multiple lzma_indexes were concatenated. Most
1025           applications don't use these APIs but in xz it made
1026           xz --list not list all check types from concatenated .xz
1027           files. In xz --list --verbose only the per-file "Check:"
1028           lines were affected and in xz --robot --list only the "file"
1029           line was affected.
1031         - Added ABI compatibility with executables that were linked
1032           against liblzma in RHEL/CentOS 7 or other liblzma builds
1033           that had copied the problematic patch from RHEL/CentOS 7
1034           (xz-5.2.2-compat-libs.patch). For the details, see the
1035           comment at the top of src/liblzma/validate_map.sh.
1037           WARNING: This uses __symver__ attribute with GCC >= 10.
1038           In other cases the traditional __asm__(".symver ...")
1039           is used. Using link-time optimization (LTO, -flto) with
1040           GCC versions older than 10 can silently result in
1041           broken liblzma.so.5 (incorrect symbol versions)! If you
1042           want to use -flto with GCC, you must use GCC >= 10.
1043           LTO with Clang seems to work even with the traditional
1044           __asm__(".symver ...") method.
1046     * xzgrep: Fixed compatibility with old shells that break if
1047       comments inside command substitutions have apostrophes (').
1048       This problem was introduced in 5.2.6.
1050     * Build systems:
1052         - New #define in config.h: HAVE_SYMBOL_VERSIONS_LINUX
1054         - Windows: Fixed liblzma.dll build with Visual Studio project
1055           files. It broke in 5.2.6 due to a change that was made to
1056           improve CMake support.
1058         - Windows: Building liblzma with UNICODE defined should now
1059           work.
1061         - CMake files are now actually included in the release tarball.
1062           They should have been in 5.2.5 already.
1064         - Minor CMake fixes and improvements.
1066     * Added a new translation: Turkish
1069 5.2.6 (2022-08-12)
1071     * xz:
1073         - The --keep option now accepts symlinks, hardlinks, and
1074           setuid, setgid, and sticky files. Previously this required
1075           using --force.
1077         - When copying metadata from the source file to the destination
1078           file, don't try to set the group (GID) if it is already set
1079           correctly. This avoids a failure on OpenBSD (and possibly on
1080           a few other OSes) where files may get created so that their
1081           group doesn't belong to the user, and fchown(2) can fail even
1082           if it needs to do nothing.
1084         - Cap --memlimit-compress to 2000 MiB instead of 4020 MiB on
1085           MIPS32 because on MIPS32 userspace processes are limited
1086           to 2 GiB of address space.
1088     * liblzma:
1090         - Fixed a missing error-check in the threaded encoder. If a
1091           small memory allocation fails, a .xz file with an invalid
1092           Index field would be created. Decompressing such a file would
1093           produce the correct output but result in an error at the end.
1094           Thus this is a "mild" data corruption bug. Note that while
1095           a failed memory allocation can trigger the bug, it cannot
1096           cause invalid memory access.
1098         - The decoder for .lzma files now supports files that have
1099           uncompressed size stored in the header and still use the
1100           end of payload marker (end of stream marker) at the end
1101           of the LZMA stream. Such files are rare but, according to
1102           the documentation in LZMA SDK, they are valid.
1103           doc/lzma-file-format.txt was updated too.
1105         - Improved 32-bit x86 assembly files:
1106             * Support Intel Control-flow Enforcement Technology (CET)
1107             * Use non-executable stack on FreeBSD.
1109         - Visual Studio: Use non-standard _MSVC_LANG to detect C++
1110           standard version in the lzma.h API header. It's used to
1111           detect when "noexcept" can be used.
1113     * xzgrep:
1115         - Fixed arbitrary command injection via a malicious filename
1116           (CVE-2022-1271, ZDI-CAN-16587). A standalone patch for
1117           this was released to the public on 2022-04-07. A slight
1118           robustness improvement has been made since then and, if
1119           using GNU or *BSD grep, a new faster method is now used
1120           that doesn't use the old sed-based construct at all. This
1121           also fixes bad output with GNU grep >= 3.5 (2020-09-27)
1122           when xzgrepping binary files.
1124           This vulnerability was discovered by:
1125           cleemy desu wayo working with Trend Micro Zero Day Initiative
1127         - Fixed detection of corrupt .bz2 files.
1129         - Improved error handling to fix exit status in some situations
1130           and to fix handling of signals: in some situations a signal
1131           didn't make xzgrep exit when it clearly should have. It's
1132           possible that the signal handling still isn't quite perfect
1133           but hopefully it's good enough.
1135         - Documented exit statuses on the man page.
1137         - xzegrep and xzfgrep now use "grep -E" and "grep -F" instead
1138           of the deprecated egrep and fgrep commands.
1140         - Fixed parsing of the options -E, -F, -G, -P, and -X. The
1141           problem occurred when multiple options were specified in
1142           a single argument, for example,
1144               echo foo | xzgrep -Fe foo
1146           treated foo as a filename because -Fe wasn't correctly
1147           split into -F -e.
1149         - Added zstd support.
1151     * xzdiff/xzcmp:
1153         - Fixed wrong exit status. Exit status could be 2 when the
1154           correct value is 1.
1156         - Documented on the man page that exit status of 2 is used
1157           for decompression errors.
1159         - Added zstd support.
1161     * xzless:
1163         - Fix less(1) version detection. It failed if the version number
1164           from "less -V" contained a dot.
1166     * Translations:
1168         - Added new translations: Catalan, Croatian, Esperanto,
1169           Korean, Portuguese, Romanian, Serbian, Spanish, Swedish,
1170           and Ukrainian
1172         - Updated the Brazilian Portuguese translation.
1174         - Added French man page translation. This and the existing
1175           German translation aren't complete anymore because the
1176           English man pages got a few updates and the translators
1177           weren't reached so that they could update their work.
1179     * Build systems:
1181         - Windows: Fix building of resource files when config.h isn't
1182           used. CMake + Visual Studio can now build liblzma.dll.
1184         - Various fixes to the CMake support. Building static or shared
1185           liblzma should work fine in most cases. In contrast, building
1186           the command line tools with CMake is still clearly incomplete
1187           and experimental and should be used for testing only.
1190 5.2.5 (2020-03-17)
1192     * liblzma:
1194         - Fixed several C99/C11 conformance bugs. Now the code is clean
1195           under gcc/clang -fsanitize=undefined. Some of these changes
1196           might have a negative effect on performance with old GCC
1197           versions or compilers other than GCC and Clang. The configure
1198           option --enable-unsafe-type-punning can be used to (mostly)
1199           restore the old behavior but it shouldn't normally be used.
1201         - Improved API documentation of lzma_properties_decode().
1203         - Added a very minor encoder speed optimization.
1205     * xz:
1207         - Fixed a crash in "xz -dcfv not_an_xz_file". All four options
1208           were required to trigger it. The crash occurred in the
1209           progress indicator code when xz was in passthru mode where
1210           xz works like "cat".
1212         - Fixed an integer overflow with 32-bit off_t. It could happen
1213           when decompressing a file that has a long run of zero bytes
1214           which xz would try to write as a sparse file. Since the build
1215           system enables large file support by default, off_t is
1216           normally 64-bit even on 32-bit systems.
1218         - Fixes for --flush-timeout:
1219             * Fix semi-busy-waiting.
1220             * Avoid unneeded flushes when no new input has arrived
1221               since the previous flush was completed.
1223         - Added a special case for 32-bit xz: If --memlimit-compress is
1224           used to specify a limit that exceeds 4020 MiB, the limit will
1225           be set to 4020 MiB. The values "0" and "max" aren't affected
1226           by this and neither is decompression. This hack can be
1227           helpful when a 32-bit xz has access to 4 GiB address space
1228           but the specified memlimit exceeds 4 GiB. This can happen
1229           e.g. with some scripts.
1231         - Capsicum sandbox is now enabled by default where available
1232           (FreeBSD >= 10). The sandbox debug messages (xz -vv) were
1233           removed since they seemed to be more annoying than useful.
1235         - DOS build now requires DJGPP 2.05 instead of 2.04beta.
1236           A workaround for a locale problem with DJGPP 2.05 was added.
1238     * xzgrep and other scripts:
1240         - Added a configure option --enable-path-for-scripts=PREFIX.
1241           It is disabled by default except on Solaris where the default
1242           is /usr/xpg4/bin. See INSTALL for details.
1244         - Added a workaround for a POSIX shell detection problem on
1245           Solaris.
1247     * Build systems:
1249         - Added preliminary build instructions for z/OS. See INSTALL
1250           section 1.2.9.
1252         - Experimental CMake support was added. It should work to build
1253           static liblzma on a few operating systems. It may or may not
1254           work to build shared liblzma. On some platforms it can build
1255           xz and xzdec too but those are only for testing. See the
1256           comment in the beginning of CMakeLists.txt for details.
1258         - Visual Studio project files were updated.
1259           WindowsTargetPlatformVersion was removed from VS2017 files
1260           and set to "10.0" in the added VS2019 files. In the future
1261           the VS project files will be removed when CMake support is
1262           good enough.
1264         - New #defines in config.h: HAVE___BUILTIN_ASSUME_ALIGNED,
1265           HAVE___BUILTIN_BSWAPXX, and TUKLIB_USE_UNSAFE_TYPE_PUNNING.
1267         - autogen.sh has a new optional dependency on po4a and a new
1268           option --no-po4a to skip that step. This matters only if one
1269           wants to remake the build files. po4a is used to update the
1270           translated man pages but as long as the man pages haven't
1271           been modified, there's nothing to update and one can use
1272           --no-po4a to avoid the dependency on po4a.
1274     * Translations:
1276         - XZ Utils translations are now handled by the Translation
1277           Project: https://translationproject.org/domain/xz.html
1279         - All man pages are now included in German too.
1281         - New xz translations: Brazilian Portuguese, Finnish,
1282           Hungarian, Chinese (simplified), Chinese (traditional),
1283           and Danish (partial translation)
1285         - Updated xz translations: French, German, Italian, and Polish
1287         - Unfortunately a few new xz translations weren't included due
1288           to technical problems like too long lines in --help output or
1289           misaligned column headings in tables. In the future, many of
1290           these strings will be split and e.g. the table column
1291           alignment will be handled in software. This should make the
1292           strings easier to translate.
1295 5.2.4 (2018-04-29)
1297     * liblzma:
1299         - Allow 0 as memory usage limit instead of returning
1300           LZMA_PROG_ERROR. Now 0 is treated as if 1 byte was specified,
1301           which effectively is the same as 0.
1303         - Use "noexcept" keyword instead of "throw()" in the public
1304           headers when a C++11 (or newer standard) compiler is used.
1306         - Added a portability fix for recent Intel C Compilers.
1308         - Microsoft Visual Studio build files have been moved under
1309           windows/vs2013 and windows/vs2017.
1311     * xz:
1313         - Fix "xz --list --robot missing_or_bad_file.xz" which would
1314           try to print an uninitialized string and thus produce garbage
1315           output. Since the exit status is non-zero, most uses of such
1316           a command won't try to interpret the garbage output.
1318         - "xz --list foo.xz" could print "Internal error (bug)" in a
1319           corner case where a specific memory usage limit had been set.
1322 5.2.3 (2016-12-30)
1324     * xz:
1326         - Always close a file before trying to delete it to avoid
1327           problems on some operating system and file system combinations.
1329         - Fixed copying of file timestamps on Windows.
1331         - Added experimental (disabled by default) sandbox support using
1332           Capsicum (FreeBSD >= 10). See --enable-sandbox in INSTALL.
1334     * C99/C11 conformance fixes to liblzma. The issues affected at least
1335       some builds using link-time optimizations.
1337     * Fixed bugs in the rarely-used function lzma_index_dup().
1339     * Use of external SHA-256 code is now disabled by default.
1340       It can still be enabled by passing --enable-external-sha256
1341       to configure. The reasons to disable it by default (see INSTALL
1342       for more details):
1344         - Some OS-specific SHA-256 implementations conflict with
1345           OpenSSL and cause problems in programs that link against both
1346           liblzma and libcrypto. At least FreeBSD 10 and MINIX 3.3.0
1347           are affected.
1349         - The internal SHA-256 is faster than the SHA-256 code in
1350           some operating systems.
1352     * Changed CPU core count detection to use sched_getaffinity() on
1353       GNU/Linux and GNU/kFreeBSD.
1355     * Fixes to the build-system and xz to make xz buildable even when
1356       encoders, decoders, or threading have been disabled from libilzma
1357       using configure options. These fixes added two new #defines to
1358       config.h: HAVE_ENCODERS and HAVE_DECODERS.
1361 5.2.2 (2015-09-29)
1363     * Fixed bugs in QNX-specific code.
1365     * Omitted the use of pipe2() even if it is available to avoid
1366       portability issues with some old Linux and glibc combinations.
1368     * Updated German translation.
1370     * Added project files to build static and shared liblzma (not the
1371       whole XZ Utils) with Visual Studio 2013 update 2 or later.
1373     * Documented that threaded decompression hasn't been implemented
1374       yet. A 5.2.0 NEWS entry describing multi-threading support had
1375       incorrectly said "decompression" when it should have said
1376       "compression".
1379 5.2.1 (2015-02-26)
1381     * Fixed a compression-ratio regression in fast mode of LZMA1 and
1382       LZMA2. The bug is present in 5.1.4beta and 5.2.0 releases.
1384     * Fixed a portability problem in xz that affected at least OpenBSD.
1386     * Fixed xzdiff to be compatible with FreeBSD's mktemp which differs
1387       from most other mktemp implementations.
1389     * Changed CPU core count detection to use cpuset_getaffinity() on
1390       FreeBSD.
1393 5.2.0 (2014-12-21)
1395     Since 5.1.4beta:
1397     * All fixes from 5.0.8
1399     * liblzma: Fixed lzma_stream_encoder_mt_memusage() when a preset
1400       was used.
1402     * xzdiff: If mktemp isn't installed, mkdir will be used as
1403       a fallback to create a temporary directory. Installing mktemp
1404       is still recommended.
1406     * Updated French, German, Italian, Polish, and Vietnamese
1407       translations.
1409     Summary of fixes and new features added in the 5.1.x development
1410     releases:
1412     * liblzma:
1414         - Added support for multi-threaded compression. See the
1415           lzma_mt structure, lzma_stream_encoder_mt(), and
1416           lzma_stream_encoder_mt_memusage() in <lzma/container.h>,
1417           lzma_get_progress() in <lzma/base.h>, and lzma_cputhreads()
1418           in <lzma/hardware.h> for details.
1420         - Made the uses of lzma_allocator const correct.
1422         - Added lzma_block_uncomp_encode() to create uncompressed
1423           .xz Blocks using LZMA2 uncompressed chunks.
1425         - Added support for LZMA_IGNORE_CHECK.
1427         - A few speed optimizations were made.
1429         - Added support for symbol versioning. It is enabled by default
1430           on GNU/Linux, other GNU-based systems, and FreeBSD.
1432         - liblzma (not the whole XZ Utils) should now be buildable
1433           with MSVC 2013 update 2 or later using windows/config.h.
1435     * xz:
1437         - Fixed a race condition in the signal handling. It was
1438           possible that e.g. the first SIGINT didn't make xz exit
1439           if reading or writing blocked and one had bad luck. The fix
1440           is non-trivial, so as of writing it is unknown if it will be
1441           backported to the v5.0 branch.
1443         - Multi-threaded compression can be enabled with the
1444           --threads (-T) option.
1445           [Fixed: This originally said "decompression".]
1447         - New command line options in xz: --single-stream,
1448           --block-size=SIZE, --block-list=SIZES,
1449           --flush-timeout=TIMEOUT, and --ignore-check.
1451         - xz -lvv now shows the minimum xz version that is required to
1452           decompress the file. Currently it is 5.0.0 for all supported
1453           .xz files except files with empty LZMA2 streams require 5.0.2.
1455     * xzdiff and xzgrep now support .lzo files if lzop is installed.
1456       The .tzo suffix is also recognized as a shorthand for .tar.lzo.
1459 5.1.4beta (2014-09-14)
1461     * All fixes from 5.0.6
1463     * liblzma: Fixed the use of presets in threaded encoder
1464       initialization.
1466     * xz --block-list and --block-size can now be used together
1467       in single-threaded mode. Previously the combination only
1468       worked in multi-threaded mode.
1470     * Added support for LZMA_IGNORE_CHECK to liblzma and made it
1471       available in xz as --ignore-check.
1473     * liblzma speed optimizations:
1475         - Initialization of a new LZMA1 or LZMA2 encoder has been
1476           optimized. (The speed of reinitializing an already-allocated
1477           encoder isn't affected.) This helps when compressing many
1478           small buffers with lzma_stream_buffer_encode() and other
1479           similar situations where an already-allocated encoder state
1480           isn't reused. This speed-up is visible in xz too if one
1481           compresses many small files one at a time instead running xz
1482           once and giving all files as command-line arguments.
1484         - Buffer comparisons are now much faster when unaligned access
1485           is allowed (configured with --enable-unaligned-access). This
1486           speeds up encoding significantly. There is arch-specific code
1487           for 32-bit and 64-bit x86 (32-bit needs SSE2 for the best
1488           results and there's no run-time CPU detection for now).
1489           For other archs there is only generic code which probably
1490           isn't as optimal as arch-specific solutions could be.
1492         - A few speed optimizations were made to the SHA-256 code.
1493           (Note that the builtin SHA-256 code isn't used on all
1494           operating systems.)
1496     * liblzma can now be built with MSVC 2013 update 2 or later
1497       using windows/config.h.
1499     * Vietnamese translation was added.
1502 5.1.3alpha (2013-10-26)
1504     * All fixes from 5.0.5
1506     * liblzma:
1508         - Fixed a deadlock in the threaded encoder.
1510         - Made the uses of lzma_allocator const correct.
1512         - Added lzma_block_uncomp_encode() to create uncompressed
1513           .xz Blocks using LZMA2 uncompressed chunks.
1515         - Added support for native threads on Windows and the ability
1516           to detect the number of CPU cores.
1518     * xz:
1520         - Fixed a race condition in the signal handling. It was
1521           possible that e.g. the first SIGINT didn't make xz exit
1522           if reading or writing blocked and one had bad luck. The fix
1523           is non-trivial, so as of writing it is unknown if it will be
1524           backported to the v5.0 branch.
1526         - Made the progress indicator work correctly in threaded mode.
1528         - Threaded encoder now works together with --block-list=SIZES.
1530         - Added preliminary support for --flush-timeout=TIMEOUT.
1531           It can be useful for (somewhat) real-time streaming. For
1532           now the decompression side has to be done with something
1533           else than the xz tool due to how xz does buffering, but this
1534           should be fixed.
1537 5.1.2alpha (2012-07-04)
1539     * All fixes from 5.0.3 and 5.0.4
1541     * liblzma:
1543         - Fixed a deadlock and an invalid free() in the threaded encoder.
1545         - Added support for symbol versioning. It is enabled by default
1546           on GNU/Linux, other GNU-based systems, and FreeBSD.
1548         - Use SHA-256 implementation from the operating system if one is
1549           available in libc, libmd, or libutil. liblzma won't use e.g.
1550           OpenSSL or libgcrypt to avoid introducing new dependencies.
1552         - Fixed liblzma.pc for static linking.
1554         - Fixed a few portability bugs.
1556     * xz --decompress --single-stream now fixes the input position after
1557       successful decompression. Now the following works:
1559           echo foo | xz > foo.xz
1560           echo bar | xz >> foo.xz
1561           ( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
1563       Note that it doesn't work if the input is not seekable
1564       or if there is Stream Padding between the concatenated
1565       .xz Streams.
1567     * xz -lvv now shows the minimum xz version that is required to
1568       decompress the file. Currently it is 5.0.0 for all supported .xz
1569       files except files with empty LZMA2 streams require 5.0.2.
1571     * Added an *incomplete* implementation of --block-list=SIZES to xz.
1572       It only works correctly in single-threaded mode and when
1573       --block-size isn't used at the same time. --block-list allows
1574       specifying the sizes of Blocks which can be useful e.g. when
1575       creating files for random-access reading.
1578 5.1.1alpha (2011-04-12)
1580     * All fixes from 5.0.2
1582     * liblzma fixes that will also be included in 5.0.3:
1584         - A memory leak was fixed.
1586         - lzma_stream_buffer_encode() no longer creates an empty .xz
1587           Block if encoding an empty buffer. Such an empty Block with
1588           LZMA2 data would trigger a bug in 5.0.1 and older (see the
1589           first bullet point in 5.0.2 notes). When releasing 5.0.2,
1590           I thought that no encoder creates this kind of files but
1591           I was wrong.
1593         - Validate function arguments better in a few functions. Most
1594           importantly, specifying an unsupported integrity check to
1595           lzma_stream_buffer_encode() no longer creates a corrupt .xz
1596           file. Probably no application tries to do that, so this
1597           shouldn't be a big problem in practice.
1599         - Document that lzma_block_buffer_encode(),
1600           lzma_easy_buffer_encode(), lzma_stream_encoder(), and
1601           lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
1603         - The return values of the _memusage() functions are now
1604           documented better.
1606     * Support for multithreaded compression was added using the simplest
1607       method, which splits the input data into blocks and compresses
1608       them independently. Other methods will be added in the future.
1609       The current method has room for improvement, e.g. it is possible
1610       to reduce the memory usage.
1612     * Added the options --single-stream and --block-size=SIZE to xz.
1614     * xzdiff and xzgrep now support .lzo files if lzop is installed.
1615       The .tzo suffix is also recognized as a shorthand for .tar.lzo.
1617     * Support for short 8.3 filenames under DOS was added to xz. It is
1618       experimental and may change before it gets into a stable release.
1621 5.0.8 (2014-12-21)
1623     * Fixed an old bug in xzgrep that affected OpenBSD and probably
1624       a few other operating systems too.
1626     * Updated French and German translations.
1628     * Added support for detecting the amount of RAM on AmigaOS/AROS.
1630     * Minor build system updates.
1633 5.0.7 (2014-09-20)
1635     * Fix regressions introduced in 5.0.6:
1637         - Fix building with non-GNU make.
1639         - Fix invalid Libs.private value in liblzma.pc which broke
1640           static linking against liblzma if the linker flags were
1641           taken from pkg-config.
1644 5.0.6 (2014-09-14)
1646     * xzgrep now exits with status 0 if at least one file matched.
1648     * A few minor portability and build system fixes
1651 5.0.5 (2013-06-30)
1653     * lzmadec and liblzma's lzma_alone_decoder(): Support decompressing
1654       .lzma files that have less common settings in the headers
1655       (dictionary size other than 2^n or 2^n + 2^(n-1), or uncompressed
1656       size greater than 256 GiB). The limitations existed to avoid false
1657       positives when detecting .lzma files. The lc + lp <= 4 limitation
1658       still remains since liblzma's LZMA decoder has that limitation.
1660       NOTE: xz's .lzma support or liblzma's lzma_auto_decoder() are NOT
1661       affected by this change. They still consider uncommon .lzma headers
1662       as not being in the .lzma format. Changing this would give way too
1663       many false positives.
1665     * xz:
1667         - Interaction of preset and custom filter chain options was
1668           made less illogical. This affects only certain less typical
1669           uses cases so few people are expected to notice this change.
1671           Now when a custom filter chain option (e.g. --lzma2) is
1672           specified, all preset options (-0 ... -9, -e) earlier are on
1673           the command line are completely forgotten. Similarly, when
1674           a preset option is specified, all custom filter chain options
1675           earlier on the command line are completely forgotten.
1677           Example 1: "xz -9 --lzma2=preset=5 -e" is equivalent to "xz -e"
1678           which is equivalent to "xz -6e". Earlier -e didn't put xz back
1679           into preset mode and thus the example command was equivalent
1680           to "xz --lzma2=preset=5".
1682           Example 2: "xz -9e --lzma2=preset=5 -7" is equivalent to
1683           "xz -7". Earlier a custom filter chain option didn't make
1684           xz forget the -e option so the example was equivalent to
1685           "xz -7e".
1687         - Fixes and improvements to error handling.
1689         - Various fixes to the man page.
1691     * xzless: Fixed to work with "less" versions 448 and later.
1693     * xzgrep: Made -h an alias for --no-filename.
1695     * Include the previously missing debug/translation.bash which can
1696       be useful for translators.
1698     * Include a build script for Mac OS X. This has been in the Git
1699       repository since 2010 but due to a mistake in Makefile.am the
1700       script hasn't been included in a release tarball before.
1703 5.0.4 (2012-06-22)
1705     * liblzma:
1707         - Fix lzma_index_init(). It could crash if memory allocation
1708           failed.
1710         - Fix the possibility of an incorrect LZMA_BUF_ERROR when a BCJ
1711           filter is used and the application only provides exactly as
1712           much output space as is the uncompressed size of the file.
1714         - Fix a bug in doc/examples_old/xz_pipe_decompress.c. It didn't
1715           check if the last call to lzma_code() really returned
1716           LZMA_STREAM_END, which made the program think that truncated
1717           files are valid.
1719         - New example programs in doc/examples (old programs are now in
1720           doc/examples_old). These have more comments and more detailed
1721           error handling.
1723     * Fix "xz -lvv foo.xz". It could crash on some corrupted files.
1725     * Fix output of "xz --robot -lv" and "xz --robot -lvv" which
1726       incorrectly printed the filename also in the "foo (x/x)" format.
1728     * Fix exit status of "xzdiff foo.xz bar.xz".
1730     * Fix exit status of "xzgrep foo binary_file".
1732     * Fix portability to EBCDIC systems.
1734     * Fix a configure issue on AIX with the XL C compiler. See INSTALL
1735       for details.
1737     * Update French, German, Italian, and Polish translations.
1740 5.0.3 (2011-05-21)
1742     * liblzma fixes:
1744         - A memory leak was fixed.
1746         - lzma_stream_buffer_encode() no longer creates an empty .xz
1747           Block if encoding an empty buffer. Such an empty Block with
1748           LZMA2 data would trigger a bug in 5.0.1 and older (see the
1749           first bullet point in 5.0.2 notes). When releasing 5.0.2,
1750           I thought that no encoder creates this kind of files but
1751           I was wrong.
1753         - Validate function arguments better in a few functions. Most
1754           importantly, specifying an unsupported integrity check to
1755           lzma_stream_buffer_encode() no longer creates a corrupt .xz
1756           file. Probably no application tries to do that, so this
1757           shouldn't be a big problem in practice.
1759         - Document that lzma_block_buffer_encode(),
1760           lzma_easy_buffer_encode(), lzma_stream_encoder(), and
1761           lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
1763         - The return values of the _memusage() functions are now
1764           documented better.
1766     * Fix command name detection in xzgrep. xzegrep and xzfgrep now
1767       correctly use egrep and fgrep instead of grep.
1769     * French translation was added.
1772 5.0.2 (2011-04-01)
1774     * LZMA2 decompressor now correctly accepts LZMA2 streams with no
1775       uncompressed data. Previously it considered them corrupt. The
1776       bug can affect applications that use raw LZMA2 streams. It is
1777       very unlikely to affect .xz files because no compressor creates
1778       .xz files with empty LZMA2 streams. (Empty .xz files are a
1779       different thing than empty LZMA2 streams.)
1781     * "xz --suffix=.foo filename.foo" now refuses to compress the
1782       file due to it already having the suffix .foo. It was already
1783       documented on the man page, but the code lacked the test.
1785     * "xzgrep -l foo bar.xz" works now.
1787     * Polish translation was added.
1790 5.0.1 (2011-01-29)
1792     * xz --force now (de)compresses files that have setuid, setgid,
1793       or sticky bit set and files that have multiple hard links.
1794       The man page had it documented this way already, but the code
1795       had a bug.
1797     * gzip and bzip2 support in xzdiff was fixed.
1799     * Portability fixes
1801     * Minor fix to Czech translation
1804 5.0.0 (2010-10-23)
1806     Only the most important changes compared to 4.999.9beta are listed
1807     here. One change is especially important:
1809       * The memory usage limit is now disabled by default. Some scripts
1810         written before this change may have used --memory=max on xz command
1811         line or in XZ_OPT. THESE USES OF --memory=max SHOULD BE REMOVED
1812         NOW, because they interfere with user's ability to set the memory
1813         usage limit himself. If user-specified limit causes problems to
1814         your script, blame the user.
1816     Other significant changes:
1818       * Added support for XZ_DEFAULTS environment variable. This variable
1819         allows users to set default options for xz, e.g. default memory
1820         usage limit or default compression level. Scripts that use xz
1821         must never set or unset XZ_DEFAULTS. Scripts should use XZ_OPT
1822         instead if they need a way to pass options to xz via an
1823         environment variable.
1825       * The compression settings associated with the preset levels
1826         -0 ... -9 have been changed. --extreme was changed a little too.
1827         It is now less likely to make compression worse, but with some
1828         files the new --extreme may compress slightly worse than the old
1829         --extreme.
1831       * If a preset level (-0 ... -9) is specified after a custom filter
1832         chain options have been used (e.g. --lzma2), the custom filter
1833         chain will be forgotten. Earlier the preset options were
1834         completely ignored after custom filter chain options had been
1835         seen.
1837       * xz will create sparse files when decompressing if the uncompressed
1838         data contains long sequences of binary zeros. This is done even
1839         when writing to standard output that is connected to a regular
1840         file and certain additional conditions are met to make it safe.
1842       * Support for "xz --list" was added. Combine with --verbose or
1843         --verbose --verbose (-vv) for detailed output.
1845       * I had hoped that liblzma API would have been stable after
1846         4.999.9beta, but there have been a couple of changes in the
1847         advanced features, which don't affect most applications:
1849           - Index handling code was revised. If you were using the old
1850             API, you will get a compiler error (so it's easy to notice).
1852           - A subtle but important change was made to the Block handling
1853             API. lzma_block.version has to be initialized even for
1854             lzma_block_header_decode(). Code that doesn't do it will work
1855             for now, but might break in the future, which makes this API
1856             change easy to miss.
1858       * The major soname has been bumped to 5.0.0. liblzma API and ABI
1859         are now stable, so the need to recompile programs linking against
1860         liblzma shouldn't arise soon.