xz: Make Capsicum sandbox more strict with stdin and stdout.
[xz.git] / NEWS
blob88aa55ac48e123c766ddf8179c5b3d6642e062e7
2 XZ Utils Release Notes
3 ======================
5 5.4.1 (2023-01-11)
7     * liblzma:
9         - Fixed the return value of lzma_microlzma_encoder() if the
10           LZMA options lc/lp/pb are invalid. Invalid lc/lp/pb options
11           made the function return LZMA_STREAM_END without encoding
12           anything instead of returning LZMA_OPTIONS_ERROR.
14         - Windows / Visual Studio: Workaround a possible compiler bug
15           when targeting 32-bit x86 and compiling the CLMUL version of
16           the CRC64 code. The CLMUL code isn't enabled by the Windows
17           project files but it is in the CMake-based builds.
19     * Build systems:
21         - Windows-specific CMake changes:
23             * Don't try to enable CLMUL CRC64 code if _mm_set_epi64x()
24               isn't available. This fixes CMake-based build with Visual
25               Studio 2013.
27             * Created a workaround for a build failure with windres
28               from GNU binutils. It is used only when the C compiler
29               is GCC (not Clang). The workaround is incompatible
30               with llvm-windres, resulting in "XZx20Utils" instead
31               of "XZ Utils" in the resource file, but without the
32               workaround llvm-windres works correctly. See the
33               comment in CMakeLists.txt for details.
35             * Included the resource files in the xz and xzdec build
36               rules. Building the command line tools is still
37               experimental but possible with MinGW-w64.
39         - Visual Studio: Added stream_decoder_mt.c to the project
40           files. Now the threaded decompressor lzma_stream_decoder_mt()
41           gets built. CMake-based build wasn't affected.
43         - Updated windows/INSTALL-MSVC.txt to mention that CMake-based
44           build is now the preferred method with Visual Studio. The
45           project files will probably be removed after 5.4.x releases.
47         - Changes to #defines in config.h:
49             * HAVE_DECL_CLOCK_MONOTONIC was replaced by
50               HAVE_CLOCK_MONOTONIC. The old macro was always defined
51               in configure-generated config.h to either 0 or 1. The
52               new macro is defined (to 1) only if the declaration of
53               CLOCK_MONOTONIC is available. This matches the way most
54               other config.h macros work and makes things simpler with
55               other build systems.
57             * HAVE_DECL_PROGRAM_INVOCATION_NAME was replaced by
58               HAVE_PROGRAM_INVOCATION_NAME for the same reason.
60     * Tests:
62         - Fixed test script compatibility with ancient /bin/sh
63           versions. Now the five test_compress_* tests should
64           no longer fail on Solaris 10.
66         - Added and refactored a few tests.
68     * Translations:
70         - Updated the Catalan and Esperanto translations.
72         - Added Korean and Ukrainian man page translations.
75 5.4.0 (2022-12-13)
77     This bumps the minor version of liblzma because new features were
78     added. The API and ABI are still backward compatible with liblzma
79     5.2.x and 5.0.x.
81     Since 5.3.5beta:
83     * All fixes from 5.2.10.
85     * The ARM64 filter is now stable. The xz option is now --arm64.
86       Decompression requires XZ Utils 5.4.0. In the future the ARM64
87       filter will be supported by XZ for Java, XZ Embedded (including
88       the version in Linux), LZMA SDK, and 7-Zip.
90     * Translations:
92         - Updated Catalan, Croatian, German, Romanian, and Turkish
93           translations.
95         - Updated German man page translations.
97         - Added Romanian man page translations.
99     Summary of new features added in the 5.3.x development releases:
101     * liblzma:
103         - Added threaded .xz decompressor lzma_stream_decoder_mt().
104           It can use multiple threads with .xz files that have multiple
105           Blocks with size information in Block Headers. The threaded
106           encoder in xz has always created such files.
108           Single-threaded encoder cannot store the size information in
109           Block Headers even if one used LZMA_FULL_FLUSH to create
110           multiple Blocks, so this threaded decoder cannot use multiple
111           threads with such files.
113           If there are multiple Streams (concatenated .xz files), one
114           Stream will be decompressed completely before starting the
115           next Stream.
117         - A new decoder flag LZMA_FAIL_FAST was added. It makes the
118           threaded decompressor report errors soon instead of first
119           flushing all pending data before the error location.
121         - New Filter IDs:
122             * LZMA_FILTER_ARM64 is for ARM64 binaries.
123             * LZMA_FILTER_LZMA1EXT is for raw LZMA1 streams that don't
124               necessarily use the end marker.
126         - Added lzma_str_to_filters(), lzma_str_from_filters(), and
127           lzma_str_list_filters() to convert a preset or a filter chain
128           string to a lzma_filter[] and vice versa. These should make
129           it easier to write applications that allow users to specify
130           custom compression options.
132         - Added lzma_filters_free() which can be convenient for freeing
133           the filter options in a filter chain (an array of lzma_filter
134           structures).
136         - lzma_file_info_decoder() to makes it a little easier to get
137           the Index field from .xz files. This helps in getting the
138           uncompressed file size but an easy-to-use random access
139           API is still missing which has existed in XZ for Java for
140           a long time.
142         - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
143           It is used by erofs-utils and may be used by others too.
145           The MicroLZMA format is a raw LZMA stream (without end marker)
146           whose first byte (always 0x00) has been replaced with
147           bitwise-negation of the LZMA properties (lc/lp/pb). It was
148           created for use in EROFS but may be used in other contexts
149           as well where it is important to avoid wasting bytes for
150           stream headers or footers. The format is also supported by
151           XZ Embedded (the XZ Embedded version in Linux got MicroLZMA
152           support in Linux 5.16).
154           The MicroLZMA encoder API in liblzma can compress into a
155           fixed-sized output buffer so that as much data is compressed
156           as can be fit into the buffer while still creating a valid
157           MicroLZMA stream. This is needed for EROFS.
159         - Added lzma_lzip_decoder() to decompress the .lz (lzip) file
160           format version 0 and the original unextended version 1 files.
161           Also lzma_auto_decoder() supports .lz files.
163         - lzma_filters_update() can now be used with the multi-threaded
164           encoder (lzma_stream_encoder_mt()) to change the filter chain
165           after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
167         - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
168           finders that require at least 3 or 4. Now it is internally
169           rounded up if needed.
171         - CLMUL-based CRC64 on x86-64 and E2K with runtime processor
172           detection. On 32-bit x86 it currently isn't available unless
173           --disable-assembler is used which can make the non-CLMUL
174           CRC64 slower; this might be fixed in the future.
176         - Building with --disable-threads --enable-small
177           is now thread-safe if the compiler supports
178           __attribute__((__constructor__)).
180     * xz:
182         - Using -T0 (--threads=0) will now use multi-threaded encoder
183           even on a single-core system. This is to ensure that output
184           from the same xz binary is identical on both single-core and
185           multi-core systems.
187         - --threads=+1 or -T+1 is now a way to put xz into
188           multi-threaded mode while using only one worker thread.
189           The + is ignored if the number is not 1.
191         - A default soft memory usage limit is now used for compression
192           when -T0 is used and no explicit limit has been specified.
193           This soft limit is used to restrict the number of threads
194           but if the limit is exceeded with even one thread then xz
195           will continue with one thread using the multi-threaded
196           encoder and this limit is ignored. If the number of threads
197           is specified manually then no default limit will be used;
198           this affects only -T0.
200           This change helps on systems that have very many cores and
201           using all of them for xz makes no sense. Previously xz -T0
202           could run out of memory on such systems because it attempted
203           to reserve memory for too many threads.
205           This also helps with 32-bit builds which don't have a large
206           amount of address space that would be required for many
207           threads. The default soft limit for -T0 is at most 1400 MiB
208           on all 32-bit platforms.
210         - Previously a low value in --memlimit-compress wouldn't cause
211           xz to switch from multi-threaded mode to single-threaded mode
212           if the limit cannot otherwise be met; xz failed instead. Now
213           xz can switch to single-threaded mode and then, if needed,
214           scale down the LZMA2 dictionary size too just like it already
215           did when it was started in single-threaded mode.
217         - The option --no-adjust no longer prevents xz from scaling down
218           the number of threads as that doesn't affect the compressed
219           output (only performance). Now --no-adjust only prevents
220           adjustments that affect compressed output, that is, with
221           --no-adjust xz won't switch from multi-threaded mode to
222           single-threaded mode and won't scale down the LZMA2
223           dictionary size.
225         - Added a new option --memlimit-mt-decompress=LIMIT. This is
226           used to limit the number of decompressor threads (possibly
227           falling back to single-threaded mode) but it will never make
228           xz refuse to decompress a file. This has a system-specific
229           default value because without any limit xz could end up
230           allocating memory for the whole compressed input file, the
231           whole uncompressed output file, multiple thread-specific
232           decompressor instances and so on. Basically xz could
233           attempt to use an insane amount of memory even with fairly
234           common files. The system-specific default value is currently
235           the same as the one used for compression with -T0.
237           The new option works together with the existing option
238           --memlimit-decompress=LIMIT. The old option sets a hard limit
239           that must not be exceeded (xz will refuse to decompress)
240           while the new option only restricts the number of threads.
241           If the limit set with --memlimit-mt-decompress is greater
242           than the limit set with --memlimit-compress, then the latter
243           value is used also for --memlimit-mt-decompress.
245         - Added new information to the output of xz --info-memory and
246           new fields to the output of xz --robot --info-memory.
248         - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
249           now that liblzma handles it.
251         - Don't mention endianness for ARM and ARM-Thumb filters in
252           --long-help. The filters only work for little endian
253           instruction encoding but modern ARM processors using
254           big endian data access still use little endian
255           instruction encoding. So the help text was misleading.
256           In contrast, the PowerPC filter is only for big endian
257           32/64-bit PowerPC code. Little endian PowerPC would need
258           a separate filter.
260         - Added decompression support for the .lz (lzip) file format
261           version 0 and the original unextended version 1. It is
262           autodetected by default. See also the option --format on
263           the xz man page.
265         - Sandboxing enabled by default:
266             * Capsicum (FreeBSD)
267             * pledge(2) (OpenBSD)
269     * Scripts now support the .lz format using xz.
271     * A few new tests were added.
273     * The liblzma-specific tests are now supported in CMake-based
274       builds too ("make test").
277 5.3.5beta (2022-12-01)
279     * All fixes from 5.2.9.
281     * liblzma:
283         - Added new LZMA_FILTER_LZMA1EXT for raw encoder and decoder to
284           handle raw LZMA1 streams that don't have end of payload marker
285           (EOPM) alias end of stream (EOS) marker. It can be used in
286           filter chains, for example, with the x86 BCJ filter.
288         - Added lzma_str_to_filters(), lzma_str_from_filters(), and
289           lzma_str_list_filters() to make it easier for applications
290           to get custom compression options from a user and convert
291           it to an array of lzma_filter structures.
293         - Added lzma_filters_free().
295         - lzma_filters_update() can now be used with the multi-threaded
296           encoder (lzma_stream_encoder_mt()) to change the filter chain
297           after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
299         - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
300           finders that require at least 3 or 4. Now it is internally
301           rounded up if needed.
303         - ARM64 filter was modified. It is still experimental.
305         - Fixed LTO build with Clang if -fgnuc-version=10 or similar
306           was used to make Clang look like GCC >= 10. Now it uses
307           __has_attribute(__symver__) which should be reliable.
309     * xz:
311         - --threads=+1 or -T+1 is now a way to put xz into multi-threaded
312           mode while using only one worker thread.
314         - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
315           now that liblzma handles it.
317     * Updated translations: Chinese (simplified), Korean, and Turkish.
320 5.3.4alpha (2022-11-15)
322     * All fixes from 5.2.7 and 5.2.8.
324     * liblzma:
326         - Minor improvements to the threaded decoder.
328         - Added CRC64 implementation that uses SSSE3, SSE4.1, and CLMUL
329           instructions on 32/64-bit x86 and E2K. On 32-bit x86 it's
330           not enabled unless --disable-assembler is used but then
331           the non-CLMUL code might be slower. Processor support is
332           detected at runtime so this is built by default on x86-64
333           and E2K. On these platforms, if compiler flags indicate
334           unconditional CLMUL support (-msse4.1 -mpclmul) then the
335           generic version is not built, making liblzma 8-9 KiB smaller
336           compared to having both versions included.
338           With extremely compressible files this can make decompression
339           up to twice as fast but with typical files 5 % improvement
340           is a more realistic expectation.
342           The CLMUL version is slower than the generic version with
343           tiny inputs (especially at 1-8 bytes per call, but up to
344           16 bytes). In normal use in xz this doesn't matter at all.
346         - Added an experimental ARM64 filter. This is *not* the final
347           version! Files created with this experimental version won't
348           be supported in the future versions! The filter design is
349           a compromise where improving one use case makes some other
350           cases worse.
352         - Added decompression support for the .lz (lzip) file format
353           version 0 and the original unextended version 1. See the
354           API docs of lzma_lzip_decoder() for details. Also
355           lzma_auto_decoder() supports .lz files.
357         - Building with --disable-threads --enable-small
358           is now thread-safe if the compiler supports
359           __attribute__((__constructor__))
361     * xz:
363         - Added support for OpenBSD's pledge(2) as a sandboxing method.
365         - Don't mention endianness for ARM and ARM-Thumb filters in
366           --long-help. The filters only work for little endian
367           instruction encoding but modern ARM processors using
368           big endian data access still use little endian
369           instruction encoding. So the help text was misleading.
370           In contrast, the PowerPC filter is only for big endian
371           32/64-bit PowerPC code. Little endian PowerPC would need
372           a separate filter.
374         - Added --experimental-arm64. This will be renamed once the
375           filter is finished. Files created with this experimental
376           filter will not be supported in the future!
378         - Added new fields to the output of xz --robot --info-memory.
380         - Added decompression support for the .lz (lzip) file format
381           version 0 and the original unextended version 1. It is
382           autodetected by default. See also the option --format on
383           the xz man page.
385     * Scripts now support the .lz format using xz.
387     * Build systems:
389         - New #defines in config.h: HAVE_ENCODER_ARM64,
390           HAVE_DECODER_ARM64, HAVE_LZIP_DECODER, HAVE_CPUID_H,
391           HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR, HAVE_USABLE_CLMUL
393         - New configure options: --disable-clmul-crc,
394           --disable-microlzma, --disable-lzip-decoder, and
395           'pledge' is now an option in --enable-sandbox (but
396           it's autodetected by default anyway).
398         - INSTALL was updated to document the new configure options.
400         - PACKAGERS now lists also --disable-microlzma and
401           --disable-lzip-decoder as configure options that must
402           not be used in builds for non-embedded use.
404     * Tests:
406         - Fix some of the tests so that they skip instead of fail if
407           certain features have been disabled with configure options.
408           It's still not perfect.
410         - Other improvements to tests.
412     * Updated translations: Croatian, Finnish, Hungarian, Polish,
413       Romanian, Spanish, Swedish, and Ukrainian.
416 5.3.3alpha (2022-08-22)
418     * All fixes from 5.2.6.
420     * liblzma:
422         - Fixed 32-bit build.
424         - Added threaded .xz decompressor lzma_stream_decoder_mt().
425           It can use multiple threads with .xz files that have multiple
426           Blocks with size information in Block Headers. The threaded
427           encoder in xz has always created such files.
429           Single-threaded encoder cannot store the size information in
430           Block Headers even if one used LZMA_FULL_FLUSH to create
431           multiple Blocks, so this threaded decoder cannot use multiple
432           threads with such files.
434           If there are multiple Streams (concatenated .xz files), one
435           Stream will be decompressed completely before starting the
436           next Stream.
438         - A new decoder flag LZMA_FAIL_FAST was added. It makes the
439           threaded decompressor report errors soon instead of first
440           flushing all pending data before the error location.
442     * xz:
444         - Using -T0 (--threads=0) will now use multi-threaded encoder
445           even on a single-core system. This is to ensure that output
446           from the same xz binary is identical on both single-core and
447           multi-core systems.
449         - A default soft memory usage limit is now used for compression
450           when -T0 is used and no explicit limit has been specified.
451           This soft limit is used to restrict the number of threads
452           but if the limit is exceeded with even one thread then xz
453           will continue with one thread using the multi-threaded
454           encoder and this limit is ignored. If the number of threads
455           is specified manually then no default limit will be used;
456           this affects only -T0.
458           This change helps on systems that have very many cores and
459           using all of them for xz makes no sense. Previously xz -T0
460           could run out of memory on such systems because it attempted
461           to reserve memory for too many threads.
463           This also helps with 32-bit builds which don't have a large
464           amount of address space that would be required for many
465           threads. The default limit is 1400 MiB on all 32-bit
466           platforms with -T0.
468           Now xz -T0 should just work. It might use too few threads
469           in some cases but at least it shouldn't easily run out of
470           memory. It's possible that this will be tweaked before 5.4.0.
472         - Changes to --memlimit-compress and --no-adjust:
474           In single-threaded mode, --memlimit-compress can make xz
475           scale down the LZMA2 dictionary size to meet the memory usage
476           limit. This obviously affects the compressed output. However,
477           if xz was in threaded mode, --memlimit-compress could make xz
478           reduce the number of threads but it wouldn't make xz switch
479           from multi-threaded mode to single-threaded mode or scale
480           down the LZMA2 dictionary size. This seemed illogical.
482           Now --memlimit-compress can make xz switch to single-threaded
483           mode if one thread in multi-threaded mode uses too much
484           memory. If memory usage is still too high, then the LZMA2
485           dictionary size can be scaled down too.
487           The option --no-adjust was also changed so that it no longer
488           prevents xz from scaling down the number of threads as that
489           doesn't affect compressed output (only performance). After
490           this commit --no-adjust only prevents adjustments that affect
491           compressed output, that is, with --no-adjust xz won't switch
492           from multithreaded mode to single-threaded mode and won't
493           scale down the LZMA2 dictionary size.
495         - Added a new option --memlimit-mt-decompress=LIMIT. This is
496           used to limit the number of decompressor threads (possibly
497           falling back to single-threaded mode) but it will never make
498           xz refuse to decompress a file. This has a system-specific
499           default value because without any limit xz could end up
500           allocating memory for the whole compressed input file, the
501           whole uncompressed output file, multiple thread-specific
502           decompressor instances and so on. Basically xz could
503           attempt to use an insane amount of memory even with fairly
504           common files.
506           The new option works together with the existing option
507           --memlimit-decompress=LIMIT. The old option sets a hard limit
508           that must not be exceeded (xz will refuse to decompress)
509           while the new option only restricts the number of threads.
510           If the limit set with --memlimit-mt-decompress is greater
511           than the limit set with --memlimit-compress, then the latter
512           value is used also for --memlimit-mt-decompress.
514     * Tests:
516         - Added a few more tests.
518         - Added tests/code_coverage.sh to create a code coverage report
519           of the tests.
521     * Build systems:
523         - Automake's parallel test harness is now used to make tests
524           finish faster.
526         - Added the CMake files to the distribution tarball. These were
527           supposed to be in 5.2.5 already.
529         - Added liblzma tests to the CMake build.
531         - Windows: Fix building of liblzma.dll with the included
532           Visual Studio project files.
535 5.3.2alpha (2021-10-28)
537     This release was made on short notice so that recent erofs-utils can
538     be built with LZMA support without needing a snapshot from xz.git.
539     Thus many pending things were not included, not even updated
540     translations (which would need to be updated for the new --list
541     strings anyway).
543     * All fixes from 5.2.5.
545     * xz:
547         - When copying metadata from the source file to the destination
548           file, don't try to set the group (GID) if it is already set
549           correctly. This avoids a failure on OpenBSD (and possibly on
550           a few other OSes) where files may get created so that their
551           group doesn't belong to the user, and fchown(2) can fail even
552           if it needs to do nothing.
554         - The --keep option now accepts symlinks, hardlinks, and
555           setuid, setgid, and sticky files. Previously this required
556           using --force.
558         - Split the long strings used in --list and --info-memory modes
559           to make them much easier for translators.
561         - If built with sandbox support and enabling the sandbox fails,
562           xz will now immediately exit with exit status of 1. Previously
563           it would only display a warning if -vv was used.
565         - Cap --memlimit-compress to 2000 MiB on MIPS32 because on
566           MIPS32 userspace processes are limited to 2 GiB of address
567           space.
569     * liblzma:
571         - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
572           The API is in lzma/container.h.
574           The MicroLZMA format is a raw LZMA stream (without end marker)
575           whose first byte (always 0x00) has been replaced with
576           bitwise-negation of the LZMA properties (lc/lp/pb). It was
577           created for use in EROFS but may be used in other contexts
578           as well where it is important to avoid wasting bytes for
579           stream headers or footers. The format is also supported by
580           XZ Embedded.
582           The MicroLZMA encoder API in liblzma can compress into a
583           fixed-sized output buffer so that as much data is compressed
584           as can be fit into the buffer while still creating a valid
585           MicroLZMA stream. This is needed for EROFS.
587         - Added fuzzing support.
589         - Support Intel Control-flow Enforcement Technology (CET) in
590           32-bit x86 assembly files.
592         - Visual Studio: Use non-standard _MSVC_LANG to detect C++
593           standard version in the lzma.h API header. It's used to
594           detect when "noexcept" can be used.
596     * Scripts:
598         - Fix exit status of xzdiff/xzcmp. Exit status could be 2 when
599           the correct value is 1.
601         - Fix exit status of xzgrep.
603         - Detect corrupt .bz2 files in xzgrep.
605         - Add zstd support to xzgrep and xzdiff/xzcmp.
607         - Fix less(1) version detection in xzless. It failed if the
608           version number from "less -V" contained a dot.
610     * Fix typos and technical issues in man pages.
612     * Build systems:
614         - Windows: Fix building of resource files when config.h isn't
615           used. CMake + Visual Studio can now build liblzma.dll.
617         - Various fixes to the CMake support. It might still need a few
618           more fixes even for liblzma-only builds.
621 5.3.1alpha (2018-04-29)
623     * All fixes from 5.2.4.
625     * Add lzma_file_info_decoder() into liblzma and use it in xz to
626       implement the --list feature.
628     * Capsicum sandbox support is enabled by default where available
629       (FreeBSD >= 10).
632 5.2.10 (2022-12-13)
634     * xz: Don't modify argv[] when parsing the --memlimit* and
635       --block-list command line options. This fixes confusing
636       arguments in process listing (like "ps auxf").
638     * GNU/Linux only: Use __has_attribute(__symver__) to detect if
639       that attribute is supported. This fixes build on Mandriva where
640       Clang is patched to define __GNUC__ to 11 by default (instead
641       of 4 as used by Clang upstream).
644 5.2.9 (2022-11-30)
646     * liblzma:
648         - Fixed an infinite loop in LZMA encoder initialization
649           if dict_size >= 2 GiB. (The encoder only supports up
650           to 1536 MiB.)
652         - Fixed two cases of invalid free() that can happen if
653           a tiny allocation fails in encoder re-initialization
654           or in lzma_filters_update(). These bugs had some
655           similarities with the bug fixed in 5.2.7.
657         - Fixed lzma_block_encoder() not allowing the use of
658           LZMA_SYNC_FLUSH with lzma_code() even though it was
659           documented to be supported. The sync-flush code in
660           the Block encoder was already used internally via
661           lzma_stream_encoder(), so this was just a missing flag
662           in the lzma_block_encoder() API function.
664         - GNU/Linux only: Don't put symbol versions into static
665           liblzma as it breaks things in some cases (and even if
666           it didn't break anything, symbol versions in static
667           libraries are useless anyway). The downside of the fix
668           is that if the configure options --with-pic or --without-pic
669           are used then it's not possible to build both shared and
670           static liblzma at the same time on GNU/Linux anymore;
671           with those options --disable-static or --disable-shared
672           must be used too.
674     * New email address for bug reports is <xz@tukaani.org> which
675       forwards messages to Lasse Collin and Jia Tan.
678 5.2.8 (2022-11-13)
680     * xz:
682         - If xz cannot remove an input file when it should, this
683           is now treated as a warning (exit status 2) instead of
684           an error (exit status 1). This matches GNU gzip and it
685           is more logical as at that point the output file has
686           already been successfully closed.
688         - Fix handling of .xz files with an unsupported check type.
689           Previously such printed a warning message but then xz
690           behaved as if an error had occurred (didn't decompress,
691           exit status 1). Now a warning is printed, decompression
692           is done anyway, and exit status is 2. This used to work
693           slightly before 5.0.0. In practice this bug matters only
694           if xz has been built with some check types disabled. As
695           instructed in PACKAGERS, such builds should be done in
696           special situations only.
698         - Fix "xz -dc --single-stream tests/files/good-0-empty.xz"
699           which failed with "Internal error (bug)". That is,
700           --single-stream was broken if the first .xz stream in
701           the input file didn't contain any uncompressed data.
703         - Fix displaying file sizes in the progress indicator when
704           working in passthru mode and there are multiple input files.
705           Just like "gzip -cdf", "xz -cdf" works like "cat" when the
706           input file isn't a supported compressed file format. In
707           this case the file size counters weren't reset between
708           files so with multiple input files the progress indicator
709           displayed an incorrect (too large) value.
711     * liblzma:
713         - API docs in lzma/container.h:
714             * Update the list of decoder flags in the decoder
715               function docs.
716             * Explain LZMA_CONCATENATED behavior with .lzma files
717               in lzma_auto_decoder() docs.
719         - OpenBSD: Use HW_NCPUONLINE to detect the number of
720           available hardware threads in lzma_physmem().
722         - Fix use of wrong macro to detect x86 SSE2 support.
723           __SSE2_MATH__ was used with GCC/Clang but the correct
724           one is __SSE2__. The first one means that SSE2 is used
725           for floating point math which is irrelevant here.
726           The affected SSE2 code isn't used on x86-64 so this affects
727           only 32-bit x86 builds that use -msse2 without -mfpmath=sse
728           (there is no runtime detection for SSE2). It improves LZMA
729           compression speed (not decompression).
731         - Fix the build with Intel C compiler 2021 (ICC, not ICX)
732           on Linux. It defines __GNUC__ to 10 but doesn't support
733           the __symver__ attribute introduced in GCC 10.
735     * Scripts: Ignore warnings from xz by using --quiet --no-warn.
736       This is needed if the input .xz files use an unsupported
737       check type.
739     * Translations:
741         - Updated Croatian and Turkish translations.
743         - One new translations wasn't included because it needed
744           technical fixes. It will be in upcoming 5.4.0. No new
745           translations will be added to the 5.2.x branch anymore.
747         - Renamed the French man page translation file from
748           fr_FR.po to fr.po and thus also its install directory
749           (like /usr/share/man/fr_FR -> .../fr).
751         - Man page translations for upcoming 5.4.0 are now handled
752           in the Translation Project.
754     * Update doc/faq.txt a little so it's less out-of-date.
757 5.2.7 (2022-09-30)
759     * liblzma:
761         - Made lzma_filters_copy() to never modify the destination
762           array if an error occurs. lzma_stream_encoder() and
763           lzma_stream_encoder_mt() already assumed this. Before this
764           change, if a tiny memory allocation in lzma_filters_copy()
765           failed it would lead to a crash (invalid free() or invalid
766           memory reads) in the cleanup paths of these two encoder
767           initialization functions.
769         - Added missing integer overflow check to lzma_index_append().
770           This affects xz --list and other applications that decode
771           the Index field from .xz files using lzma_index_decoder().
772           Normal decompression of .xz files doesn't call this code
773           and thus most applications using liblzma aren't affected
774           by this bug.
776         - Single-threaded .xz decoder (lzma_stream_decoder()): If
777           lzma_code() returns LZMA_MEMLIMIT_ERROR it is now possible
778           to use lzma_memlimit_set() to increase the limit and continue
779           decoding. This was supposed to work from the beginning
780           but there was a bug. With other decoders (.lzma or
781           threaded .xz decoder) this already worked correctly.
783         - Fixed accumulation of integrity check type statistics in
784           lzma_index_cat(). This bug made lzma_index_checks() return
785           only the type of the integrity check of the last Stream
786           when multiple lzma_indexes were concatenated. Most
787           applications don't use these APIs but in xz it made
788           xz --list not list all check types from concatenated .xz
789           files. In xz --list --verbose only the per-file "Check:"
790           lines were affected and in xz --robot --list only the "file"
791           line was affected.
793         - Added ABI compatibility with executables that were linked
794           against liblzma in RHEL/CentOS 7 or other liblzma builds
795           that had copied the problematic patch from RHEL/CentOS 7
796           (xz-5.2.2-compat-libs.patch). For the details, see the
797           comment at the top of src/liblzma/validate_map.sh.
799           WARNING: This uses __symver__ attribute with GCC >= 10.
800           In other cases the traditional __asm__(".symver ...")
801           is used. Using link-time optimization (LTO, -flto) with
802           GCC versions older than 10 can silently result in
803           broken liblzma.so.5 (incorrect symbol versions)! If you
804           want to use -flto with GCC, you must use GCC >= 10.
805           LTO with Clang seems to work even with the traditional
806           __asm__(".symver ...") method.
808     * xzgrep: Fixed compatibility with old shells that break if
809       comments inside command substitutions have apostrophes (').
810       This problem was introduced in 5.2.6.
812     * Build systems:
814         - New #define in config.h: HAVE_SYMBOL_VERSIONS_LINUX
816         - Windows: Fixed liblzma.dll build with Visual Studio project
817           files. It broke in 5.2.6 due to a change that was made to
818           improve CMake support.
820         - Windows: Building liblzma with UNICODE defined should now
821           work.
823         - CMake files are now actually included in the release tarball.
824           They should have been in 5.2.5 already.
826         - Minor CMake fixes and improvements.
828     * Added a new translation: Turkish
831 5.2.6 (2022-08-12)
833     * xz:
835         - The --keep option now accepts symlinks, hardlinks, and
836           setuid, setgid, and sticky files. Previously this required
837           using --force.
839         - When copying metadata from the source file to the destination
840           file, don't try to set the group (GID) if it is already set
841           correctly. This avoids a failure on OpenBSD (and possibly on
842           a few other OSes) where files may get created so that their
843           group doesn't belong to the user, and fchown(2) can fail even
844           if it needs to do nothing.
846         - Cap --memlimit-compress to 2000 MiB instead of 4020 MiB on
847           MIPS32 because on MIPS32 userspace processes are limited
848           to 2 GiB of address space.
850     * liblzma:
852         - Fixed a missing error-check in the threaded encoder. If a
853           small memory allocation fails, a .xz file with an invalid
854           Index field would be created. Decompressing such a file would
855           produce the correct output but result in an error at the end.
856           Thus this is a "mild" data corruption bug. Note that while
857           a failed memory allocation can trigger the bug, it cannot
858           cause invalid memory access.
860         - The decoder for .lzma files now supports files that have
861           uncompressed size stored in the header and still use the
862           end of payload marker (end of stream marker) at the end
863           of the LZMA stream. Such files are rare but, according to
864           the documentation in LZMA SDK, they are valid.
865           doc/lzma-file-format.txt was updated too.
867         - Improved 32-bit x86 assembly files:
868             * Support Intel Control-flow Enforcement Technology (CET)
869             * Use non-executable stack on FreeBSD.
871         - Visual Studio: Use non-standard _MSVC_LANG to detect C++
872           standard version in the lzma.h API header. It's used to
873           detect when "noexcept" can be used.
875     * xzgrep:
877         - Fixed arbitrary command injection via a malicious filename
878           (CVE-2022-1271, ZDI-CAN-16587). A standalone patch for
879           this was released to the public on 2022-04-07. A slight
880           robustness improvement has been made since then and, if
881           using GNU or *BSD grep, a new faster method is now used
882           that doesn't use the old sed-based construct at all. This
883           also fixes bad output with GNU grep >= 3.5 (2020-09-27)
884           when xzgrepping binary files.
886           This vulnerability was discovered by:
887           cleemy desu wayo working with Trend Micro Zero Day Initiative
889         - Fixed detection of corrupt .bz2 files.
891         - Improved error handling to fix exit status in some situations
892           and to fix handling of signals: in some situations a signal
893           didn't make xzgrep exit when it clearly should have. It's
894           possible that the signal handling still isn't quite perfect
895           but hopefully it's good enough.
897         - Documented exit statuses on the man page.
899         - xzegrep and xzfgrep now use "grep -E" and "grep -F" instead
900           of the deprecated egrep and fgrep commands.
902         - Fixed parsing of the options -E, -F, -G, -P, and -X. The
903           problem occurred when multiple options were specied in
904           a single argument, for example,
906               echo foo | xzgrep -Fe foo
908           treated foo as a filename because -Fe wasn't correctly
909           split into -F -e.
911         - Added zstd support.
913     * xzdiff/xzcmp:
915         - Fixed wrong exit status. Exit status could be 2 when the
916           correct value is 1.
918         - Documented on the man page that exit status of 2 is used
919           for decompression errors.
921         - Added zstd support.
923     * xzless:
925         - Fix less(1) version detection. It failed if the version number
926           from "less -V" contained a dot.
928     * Translations:
930         - Added new translations: Catalan, Croatian, Esperanto,
931           Korean, Portuguese, Romanian, Serbian, Spanish, Swedish,
932           and Ukrainian
934         - Updated the Brazilian Portuguese translation.
936         - Added French man page translation. This and the existing
937           German translation aren't complete anymore because the
938           English man pages got a few updates and the translators
939           weren't reached so that they could update their work.
941     * Build systems:
943         - Windows: Fix building of resource files when config.h isn't
944           used. CMake + Visual Studio can now build liblzma.dll.
946         - Various fixes to the CMake support. Building static or shared
947           liblzma should work fine in most cases. In contrast, building
948           the command line tools with CMake is still clearly incomplete
949           and experimental and should be used for testing only.
952 5.2.5 (2020-03-17)
954     * liblzma:
956         - Fixed several C99/C11 conformance bugs. Now the code is clean
957           under gcc/clang -fsanitize=undefined. Some of these changes
958           might have a negative effect on performance with old GCC
959           versions or compilers other than GCC and Clang. The configure
960           option --enable-unsafe-type-punning can be used to (mostly)
961           restore the old behavior but it shouldn't normally be used.
963         - Improved API documentation of lzma_properties_decode().
965         - Added a very minor encoder speed optimization.
967     * xz:
969         - Fixed a crash in "xz -dcfv not_an_xz_file". All four options
970           were required to trigger it. The crash occurred in the
971           progress indicator code when xz was in passthru mode where
972           xz works like "cat".
974         - Fixed an integer overflow with 32-bit off_t. It could happen
975           when decompressing a file that has a long run of zero bytes
976           which xz would try to write as a sparse file. Since the build
977           system enables large file support by default, off_t is
978           normally 64-bit even on 32-bit systems.
980         - Fixes for --flush-timeout:
981             * Fix semi-busy-waiting.
982             * Avoid unneeded flushes when no new input has arrived
983               since the previous flush was completed.
985         - Added a special case for 32-bit xz: If --memlimit-compress is
986           used to specify a limit that exceeds 4020 MiB, the limit will
987           be set to 4020 MiB. The values "0" and "max" aren't affected
988           by this and neither is decompression. This hack can be
989           helpful when a 32-bit xz has access to 4 GiB address space
990           but the specified memlimit exceeds 4 GiB. This can happen
991           e.g. with some scripts.
993         - Capsicum sandbox is now enabled by default where available
994           (FreeBSD >= 10). The sandbox debug messages (xz -vv) were
995           removed since they seemed to be more annoying than useful.
997         - DOS build now requires DJGPP 2.05 instead of 2.04beta.
998           A workaround for a locale problem with DJGPP 2.05 was added.
1000     * xzgrep and other scripts:
1002         - Added a configure option --enable-path-for-scripts=PREFIX.
1003           It is disabled by default except on Solaris where the default
1004           is /usr/xpg4/bin. See INSTALL for details.
1006         - Added a workaround for a POSIX shell detection problem on
1007           Solaris.
1009     * Build systems:
1011         - Added preliminary build instructions for z/OS. See INSTALL
1012           section 1.2.9.
1014         - Experimental CMake support was added. It should work to build
1015           static liblzma on a few operating systems. It may or may not
1016           work to build shared liblzma. On some platforms it can build
1017           xz and xzdec too but those are only for testing. See the
1018           comment in the beginning of CMakeLists.txt for details.
1020         - Visual Studio project files were updated.
1021           WindowsTargetPlatformVersion was removed from VS2017 files
1022           and set to "10.0" in the added VS2019 files. In the future
1023           the VS project files will be removed when CMake support is
1024           good enough.
1026         - New #defines in config.h: HAVE___BUILTIN_ASSUME_ALIGNED,
1027           HAVE___BUILTIN_BSWAPXX, and TUKLIB_USE_UNSAFE_TYPE_PUNNING.
1029         - autogen.sh has a new optional dependency on po4a and a new
1030           option --no-po4a to skip that step. This matters only if one
1031           wants to remake the build files. po4a is used to update the
1032           translated man pages but as long as the man pages haven't
1033           been modified, there's nothing to update and one can use
1034           --no-po4a to avoid the dependency on po4a.
1036     * Translations:
1038         - XZ Utils translations are now handled by the Translation
1039           Project: https://translationproject.org/domain/xz.html
1041         - All man pages are now included in German too.
1043         - New xz translations: Brazilian Portuguese, Finnish,
1044           Hungarian, Chinese (simplified), Chinese (traditional),
1045           and Danish (partial translation)
1047         - Updated xz translations: French, German, Italian, and Polish
1049         - Unfortunately a few new xz translations weren't included due
1050           to technical problems like too long lines in --help output or
1051           misaligned column headings in tables. In the future, many of
1052           these strings will be split and e.g. the table column
1053           alignment will be handled in software. This should make the
1054           strings easier to translate.
1057 5.2.4 (2018-04-29)
1059     * liblzma:
1061         - Allow 0 as memory usage limit instead of returning
1062           LZMA_PROG_ERROR. Now 0 is treated as if 1 byte was specified,
1063           which effectively is the same as 0.
1065         - Use "noexcept" keyword instead of "throw()" in the public
1066           headers when a C++11 (or newer standard) compiler is used.
1068         - Added a portability fix for recent Intel C Compilers.
1070         - Microsoft Visual Studio build files have been moved under
1071           windows/vs2013 and windows/vs2017.
1073     * xz:
1075         - Fix "xz --list --robot missing_or_bad_file.xz" which would
1076           try to print an uninitialized string and thus produce garbage
1077           output. Since the exit status is non-zero, most uses of such
1078           a command won't try to interpret the garbage output.
1080         - "xz --list foo.xz" could print "Internal error (bug)" in a
1081           corner case where a specific memory usage limit had been set.
1084 5.2.3 (2016-12-30)
1086     * xz:
1088         - Always close a file before trying to delete it to avoid
1089           problems on some operating system and file system combinations.
1091         - Fixed copying of file timestamps on Windows.
1093         - Added experimental (disabled by default) sandbox support using
1094           Capsicum (FreeBSD >= 10). See --enable-sandbox in INSTALL.
1096     * C99/C11 conformance fixes to liblzma. The issues affected at least
1097       some builds using link-time optimizations.
1099     * Fixed bugs in the rarely-used function lzma_index_dup().
1101     * Use of external SHA-256 code is now disabled by default.
1102       It can still be enabled by passing --enable-external-sha256
1103       to configure. The reasons to disable it by default (see INSTALL
1104       for more details):
1106         - Some OS-specific SHA-256 implementations conflict with
1107           OpenSSL and cause problems in programs that link against both
1108           liblzma and libcrypto. At least FreeBSD 10 and MINIX 3.3.0
1109           are affected.
1111         - The internal SHA-256 is faster than the SHA-256 code in
1112           some operating systems.
1114     * Changed CPU core count detection to use sched_getaffinity() on
1115       GNU/Linux and GNU/kFreeBSD.
1117     * Fixes to the build-system and xz to make xz buildable even when
1118       encoders, decoders, or threading have been disabled from libilzma
1119       using configure options. These fixes added two new #defines to
1120       config.h: HAVE_ENCODERS and HAVE_DECODERS.
1123 5.2.2 (2015-09-29)
1125     * Fixed bugs in QNX-specific code.
1127     * Omitted the use of pipe2() even if it is available to avoid
1128       portability issues with some old Linux and glibc combinations.
1130     * Updated German translation.
1132     * Added project files to build static and shared liblzma (not the
1133       whole XZ Utils) with Visual Studio 2013 update 2 or later.
1135     * Documented that threaded decompression hasn't been implemented
1136       yet. A 5.2.0 NEWS entry describing multi-threading support had
1137       incorrectly said "decompression" when it should have said
1138       "compression".
1141 5.2.1 (2015-02-26)
1143     * Fixed a compression-ratio regression in fast mode of LZMA1 and
1144       LZMA2. The bug is present in 5.1.4beta and 5.2.0 releases.
1146     * Fixed a portability problem in xz that affected at least OpenBSD.
1148     * Fixed xzdiff to be compatible with FreeBSD's mktemp which differs
1149       from most other mktemp implementations.
1151     * Changed CPU core count detection to use cpuset_getaffinity() on
1152       FreeBSD.
1155 5.2.0 (2014-12-21)
1157     Since 5.1.4beta:
1159     * All fixes from 5.0.8
1161     * liblzma: Fixed lzma_stream_encoder_mt_memusage() when a preset
1162       was used.
1164     * xzdiff: If mktemp isn't installed, mkdir will be used as
1165       a fallback to create a temporary directory. Installing mktemp
1166       is still recommended.
1168     * Updated French, German, Italian, Polish, and Vietnamese
1169       translations.
1171     Summary of fixes and new features added in the 5.1.x development
1172     releases:
1174     * liblzma:
1176         - Added support for multi-threaded compression. See the
1177           lzma_mt structure, lzma_stream_encoder_mt(), and
1178           lzma_stream_encoder_mt_memusage() in <lzma/container.h>,
1179           lzma_get_progress() in <lzma/base.h>, and lzma_cputhreads()
1180           in <lzma/hardware.h> for details.
1182         - Made the uses of lzma_allocator const correct.
1184         - Added lzma_block_uncomp_encode() to create uncompressed
1185           .xz Blocks using LZMA2 uncompressed chunks.
1187         - Added support for LZMA_IGNORE_CHECK.
1189         - A few speed optimizations were made.
1191         - Added support for symbol versioning. It is enabled by default
1192           on GNU/Linux, other GNU-based systems, and FreeBSD.
1194         - liblzma (not the whole XZ Utils) should now be buildable
1195           with MSVC 2013 update 2 or later using windows/config.h.
1197     * xz:
1199         - Fixed a race condition in the signal handling. It was
1200           possible that e.g. the first SIGINT didn't make xz exit
1201           if reading or writing blocked and one had bad luck. The fix
1202           is non-trivial, so as of writing it is unknown if it will be
1203           backported to the v5.0 branch.
1205         - Multi-threaded compression can be enabled with the
1206           --threads (-T) option.
1207           [Fixed: This originally said "decompression".]
1209         - New command line options in xz: --single-stream,
1210           --block-size=SIZE, --block-list=SIZES,
1211           --flush-timeout=TIMEOUT, and --ignore-check.
1213         - xz -lvv now shows the minimum xz version that is required to
1214           decompress the file. Currently it is 5.0.0 for all supported
1215           .xz files except files with empty LZMA2 streams require 5.0.2.
1217     * xzdiff and xzgrep now support .lzo files if lzop is installed.
1218       The .tzo suffix is also recognized as a shorthand for .tar.lzo.
1221 5.1.4beta (2014-09-14)
1223     * All fixes from 5.0.6
1225     * liblzma: Fixed the use of presets in threaded encoder
1226       initialization.
1228     * xz --block-list and --block-size can now be used together
1229       in single-threaded mode. Previously the combination only
1230       worked in multi-threaded mode.
1232     * Added support for LZMA_IGNORE_CHECK to liblzma and made it
1233       available in xz as --ignore-check.
1235     * liblzma speed optimizations:
1237         - Initialization of a new LZMA1 or LZMA2 encoder has been
1238           optimized. (The speed of reinitializing an already-allocated
1239           encoder isn't affected.) This helps when compressing many
1240           small buffers with lzma_stream_buffer_encode() and other
1241           similar situations where an already-allocated encoder state
1242           isn't reused. This speed-up is visible in xz too if one
1243           compresses many small files one at a time instead running xz
1244           once and giving all files as command-line arguments.
1246         - Buffer comparisons are now much faster when unaligned access
1247           is allowed (configured with --enable-unaligned-access). This
1248           speeds up encoding significantly. There is arch-specific code
1249           for 32-bit and 64-bit x86 (32-bit needs SSE2 for the best
1250           results and there's no run-time CPU detection for now).
1251           For other archs there is only generic code which probably
1252           isn't as optimal as arch-specific solutions could be.
1254         - A few speed optimizations were made to the SHA-256 code.
1255           (Note that the builtin SHA-256 code isn't used on all
1256           operating systems.)
1258     * liblzma can now be built with MSVC 2013 update 2 or later
1259       using windows/config.h.
1261     * Vietnamese translation was added.
1264 5.1.3alpha (2013-10-26)
1266     * All fixes from 5.0.5
1268     * liblzma:
1270         - Fixed a deadlock in the threaded encoder.
1272         - Made the uses of lzma_allocator const correct.
1274         - Added lzma_block_uncomp_encode() to create uncompressed
1275           .xz Blocks using LZMA2 uncompressed chunks.
1277         - Added support for native threads on Windows and the ability
1278           to detect the number of CPU cores.
1280     * xz:
1282         - Fixed a race condition in the signal handling. It was
1283           possible that e.g. the first SIGINT didn't make xz exit
1284           if reading or writing blocked and one had bad luck. The fix
1285           is non-trivial, so as of writing it is unknown if it will be
1286           backported to the v5.0 branch.
1288         - Made the progress indicator work correctly in threaded mode.
1290         - Threaded encoder now works together with --block-list=SIZES.
1292         - Added preliminary support for --flush-timeout=TIMEOUT.
1293           It can be useful for (somewhat) real-time streaming. For
1294           now the decompression side has to be done with something
1295           else than the xz tool due to how xz does buffering, but this
1296           should be fixed.
1299 5.1.2alpha (2012-07-04)
1301     * All fixes from 5.0.3 and 5.0.4
1303     * liblzma:
1305         - Fixed a deadlock and an invalid free() in the threaded encoder.
1307         - Added support for symbol versioning. It is enabled by default
1308           on GNU/Linux, other GNU-based systems, and FreeBSD.
1310         - Use SHA-256 implementation from the operating system if one is
1311           available in libc, libmd, or libutil. liblzma won't use e.g.
1312           OpenSSL or libgcrypt to avoid introducing new dependencies.
1314         - Fixed liblzma.pc for static linking.
1316         - Fixed a few portability bugs.
1318     * xz --decompress --single-stream now fixes the input position after
1319       successful decompression. Now the following works:
1321           echo foo | xz > foo.xz
1322           echo bar | xz >> foo.xz
1323           ( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
1325       Note that it doesn't work if the input is not seekable
1326       or if there is Stream Padding between the concatenated
1327       .xz Streams.
1329     * xz -lvv now shows the minimum xz version that is required to
1330       decompress the file. Currently it is 5.0.0 for all supported .xz
1331       files except files with empty LZMA2 streams require 5.0.2.
1333     * Added an *incomplete* implementation of --block-list=SIZES to xz.
1334       It only works correctly in single-threaded mode and when
1335       --block-size isn't used at the same time. --block-list allows
1336       specifying the sizes of Blocks which can be useful e.g. when
1337       creating files for random-access reading.
1340 5.1.1alpha (2011-04-12)
1342     * All fixes from 5.0.2
1344     * liblzma fixes that will also be included in 5.0.3:
1346         - A memory leak was fixed.
1348         - lzma_stream_buffer_encode() no longer creates an empty .xz
1349           Block if encoding an empty buffer. Such an empty Block with
1350           LZMA2 data would trigger a bug in 5.0.1 and older (see the
1351           first bullet point in 5.0.2 notes). When releasing 5.0.2,
1352           I thought that no encoder creates this kind of files but
1353           I was wrong.
1355         - Validate function arguments better in a few functions. Most
1356           importantly, specifying an unsupported integrity check to
1357           lzma_stream_buffer_encode() no longer creates a corrupt .xz
1358           file. Probably no application tries to do that, so this
1359           shouldn't be a big problem in practice.
1361         - Document that lzma_block_buffer_encode(),
1362           lzma_easy_buffer_encode(), lzma_stream_encoder(), and
1363           lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
1365         - The return values of the _memusage() functions are now
1366           documented better.
1368     * Support for multithreaded compression was added using the simplest
1369       method, which splits the input data into blocks and compresses
1370       them independently. Other methods will be added in the future.
1371       The current method has room for improvement, e.g. it is possible
1372       to reduce the memory usage.
1374     * Added the options --single-stream and --block-size=SIZE to xz.
1376     * xzdiff and xzgrep now support .lzo files if lzop is installed.
1377       The .tzo suffix is also recognized as a shorthand for .tar.lzo.
1379     * Support for short 8.3 filenames under DOS was added to xz. It is
1380       experimental and may change before it gets into a stable release.
1383 5.0.8 (2014-12-21)
1385     * Fixed an old bug in xzgrep that affected OpenBSD and probably
1386       a few other operating systems too.
1388     * Updated French and German translations.
1390     * Added support for detecting the amount of RAM on AmigaOS/AROS.
1392     * Minor build system updates.
1395 5.0.7 (2014-09-20)
1397     * Fix regressions introduced in 5.0.6:
1399         - Fix building with non-GNU make.
1401         - Fix invalid Libs.private value in liblzma.pc which broke
1402           static linking against liblzma if the linker flags were
1403           taken from pkg-config.
1406 5.0.6 (2014-09-14)
1408     * xzgrep now exits with status 0 if at least one file matched.
1410     * A few minor portability and build system fixes
1413 5.0.5 (2013-06-30)
1415     * lzmadec and liblzma's lzma_alone_decoder(): Support decompressing
1416       .lzma files that have less common settings in the headers
1417       (dictionary size other than 2^n or 2^n + 2^(n-1), or uncompressed
1418       size greater than 256 GiB). The limitations existed to avoid false
1419       positives when detecting .lzma files. The lc + lp <= 4 limitation
1420       still remains since liblzma's LZMA decoder has that limitation.
1422       NOTE: xz's .lzma support or liblzma's lzma_auto_decoder() are NOT
1423       affected by this change. They still consider uncommon .lzma headers
1424       as not being in the .lzma format. Changing this would give way too
1425       many false positives.
1427     * xz:
1429         - Interaction of preset and custom filter chain options was
1430           made less illogical. This affects only certain less typical
1431           uses cases so few people are expected to notice this change.
1433           Now when a custom filter chain option (e.g. --lzma2) is
1434           specified, all preset options (-0 ... -9, -e) earlier are on
1435           the command line are completely forgotten. Similarly, when
1436           a preset option is specified, all custom filter chain options
1437           earlier on the command line are completely forgotten.
1439           Example 1: "xz -9 --lzma2=preset=5 -e" is equivalent to "xz -e"
1440           which is equivalent to "xz -6e". Earlier -e didn't put xz back
1441           into preset mode and thus the example command was equivalent
1442           to "xz --lzma2=preset=5".
1444           Example 2: "xz -9e --lzma2=preset=5 -7" is equivalent to
1445           "xz -7". Earlier a custom filter chain option didn't make
1446           xz forget the -e option so the example was equivalent to
1447           "xz -7e".
1449         - Fixes and improvements to error handling.
1451         - Various fixes to the man page.
1453     * xzless: Fixed to work with "less" versions 448 and later.
1455     * xzgrep: Made -h an alias for --no-filename.
1457     * Include the previously missing debug/translation.bash which can
1458       be useful for translators.
1460     * Include a build script for Mac OS X. This has been in the Git
1461       repository since 2010 but due to a mistake in Makefile.am the
1462       script hasn't been included in a release tarball before.
1465 5.0.4 (2012-06-22)
1467     * liblzma:
1469         - Fix lzma_index_init(). It could crash if memory allocation
1470           failed.
1472         - Fix the possibility of an incorrect LZMA_BUF_ERROR when a BCJ
1473           filter is used and the application only provides exactly as
1474           much output space as is the uncompressed size of the file.
1476         - Fix a bug in doc/examples_old/xz_pipe_decompress.c. It didn't
1477           check if the last call to lzma_code() really returned
1478           LZMA_STREAM_END, which made the program think that truncated
1479           files are valid.
1481         - New example programs in doc/examples (old programs are now in
1482           doc/examples_old). These have more comments and more detailed
1483           error handling.
1485     * Fix "xz -lvv foo.xz". It could crash on some corrupted files.
1487     * Fix output of "xz --robot -lv" and "xz --robot -lvv" which
1488       incorrectly printed the filename also in the "foo (x/x)" format.
1490     * Fix exit status of "xzdiff foo.xz bar.xz".
1492     * Fix exit status of "xzgrep foo binary_file".
1494     * Fix portability to EBCDIC systems.
1496     * Fix a configure issue on AIX with the XL C compiler. See INSTALL
1497       for details.
1499     * Update French, German, Italian, and Polish translations.
1502 5.0.3 (2011-05-21)
1504     * liblzma fixes:
1506         - A memory leak was fixed.
1508         - lzma_stream_buffer_encode() no longer creates an empty .xz
1509           Block if encoding an empty buffer. Such an empty Block with
1510           LZMA2 data would trigger a bug in 5.0.1 and older (see the
1511           first bullet point in 5.0.2 notes). When releasing 5.0.2,
1512           I thought that no encoder creates this kind of files but
1513           I was wrong.
1515         - Validate function arguments better in a few functions. Most
1516           importantly, specifying an unsupported integrity check to
1517           lzma_stream_buffer_encode() no longer creates a corrupt .xz
1518           file. Probably no application tries to do that, so this
1519           shouldn't be a big problem in practice.
1521         - Document that lzma_block_buffer_encode(),
1522           lzma_easy_buffer_encode(), lzma_stream_encoder(), and
1523           lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
1525         - The return values of the _memusage() functions are now
1526           documented better.
1528     * Fix command name detection in xzgrep. xzegrep and xzfgrep now
1529       correctly use egrep and fgrep instead of grep.
1531     * French translation was added.
1534 5.0.2 (2011-04-01)
1536     * LZMA2 decompressor now correctly accepts LZMA2 streams with no
1537       uncompressed data. Previously it considered them corrupt. The
1538       bug can affect applications that use raw LZMA2 streams. It is
1539       very unlikely to affect .xz files because no compressor creates
1540       .xz files with empty LZMA2 streams. (Empty .xz files are a
1541       different thing than empty LZMA2 streams.)
1543     * "xz --suffix=.foo filename.foo" now refuses to compress the
1544       file due to it already having the suffix .foo. It was already
1545       documented on the man page, but the code lacked the test.
1547     * "xzgrep -l foo bar.xz" works now.
1549     * Polish translation was added.
1552 5.0.1 (2011-01-29)
1554     * xz --force now (de)compresses files that have setuid, setgid,
1555       or sticky bit set and files that have multiple hard links.
1556       The man page had it documented this way already, but the code
1557       had a bug.
1559     * gzip and bzip2 support in xzdiff was fixed.
1561     * Portability fixes
1563     * Minor fix to Czech translation
1566 5.0.0 (2010-10-23)
1568     Only the most important changes compared to 4.999.9beta are listed
1569     here. One change is especially important:
1571       * The memory usage limit is now disabled by default. Some scripts
1572         written before this change may have used --memory=max on xz command
1573         line or in XZ_OPT. THESE USES OF --memory=max SHOULD BE REMOVED
1574         NOW, because they interfere with user's ability to set the memory
1575         usage limit himself. If user-specified limit causes problems to
1576         your script, blame the user.
1578     Other significant changes:
1580       * Added support for XZ_DEFAULTS environment variable. This variable
1581         allows users to set default options for xz, e.g. default memory
1582         usage limit or default compression level. Scripts that use xz
1583         must never set or unset XZ_DEFAULTS. Scripts should use XZ_OPT
1584         instead if they need a way to pass options to xz via an
1585         environment variable.
1587       * The compression settings associated with the preset levels
1588         -0 ... -9 have been changed. --extreme was changed a little too.
1589         It is now less likely to make compression worse, but with some
1590         files the new --extreme may compress slightly worse than the old
1591         --extreme.
1593       * If a preset level (-0 ... -9) is specified after a custom filter
1594         chain options have been used (e.g. --lzma2), the custom filter
1595         chain will be forgotten. Earlier the preset options were
1596         completely ignored after custom filter chain options had been
1597         seen.
1599       * xz will create sparse files when decompressing if the uncompressed
1600         data contains long sequences of binary zeros. This is done even
1601         when writing to standard output that is connected to a regular
1602         file and certain additional conditions are met to make it safe.
1604       * Support for "xz --list" was added. Combine with --verbose or
1605         --verbose --verbose (-vv) for detailed output.
1607       * I had hoped that liblzma API would have been stable after
1608         4.999.9beta, but there have been a couple of changes in the
1609         advanced features, which don't affect most applications:
1611           - Index handling code was revised. If you were using the old
1612             API, you will get a compiler error (so it's easy to notice).
1614           - A subtle but important change was made to the Block handling
1615             API. lzma_block.version has to be initialized even for
1616             lzma_block_header_decode(). Code that doesn't do it will work
1617             for now, but might break in the future, which makes this API
1618             change easy to miss.
1620       * The major soname has been bumped to 5.0.0. liblzma API and ABI
1621         are now stable, so the need to recompile programs linking against
1622         liblzma shouldn't arise soon.