7 * All fixes from 5.2.11 that were not included in 5.4.1.
9 * If xz is built with support for the Capsicum sandbox but running
10 in an environment that doesn't support Capsicum, xz now runs
11 normally without sandboxing instead of exiting with an error.
15 - Documentation was updated to improve the style, consistency,
16 and completeness of the liblzma API headers.
18 - The Doxygen-generated HTML documentation for the liblzma API
19 header files is now included in the source release and is
20 installed as part of "make install". All JavaScript is
21 removed to simplify license compliance and to reduce the
24 - Fixed a minor bug in lzma_str_from_filters() that produced
25 too many filters in the output string instead of reporting
26 an error if the input array had more than four filters. This
27 bug did not affect xz.
31 - autogen.sh now invokes the doxygen tool via the new wrapper
32 script doxygen/update-doxygen, unless the command line option
35 - Added microlzma_encoder.c and microlzma_decoder.c to the
36 VS project files for Windows and to the CMake build. These
37 should have been included in 5.3.2alpha.
41 - Added a test to the CMake build that was forgotten in the
44 - Added and refactored a few tests.
48 - Updated the Brazilian Portuguese translation.
50 - Added Brazilian Portuguese man page translation.
57 - Fixed the return value of lzma_microlzma_encoder() if the
58 LZMA options lc/lp/pb are invalid. Invalid lc/lp/pb options
59 made the function return LZMA_STREAM_END without encoding
60 anything instead of returning LZMA_OPTIONS_ERROR.
62 - Windows / Visual Studio: Workaround a possible compiler bug
63 when targeting 32-bit x86 and compiling the CLMUL version of
64 the CRC64 code. The CLMUL code isn't enabled by the Windows
65 project files but it is in the CMake-based builds.
69 - Windows-specific CMake changes:
71 * Don't try to enable CLMUL CRC64 code if _mm_set_epi64x()
72 isn't available. This fixes CMake-based build with Visual
75 * Created a workaround for a build failure with windres
76 from GNU binutils. It is used only when the C compiler
77 is GCC (not Clang). The workaround is incompatible
78 with llvm-windres, resulting in "XZx20Utils" instead
79 of "XZ Utils" in the resource file, but without the
80 workaround llvm-windres works correctly. See the
81 comment in CMakeLists.txt for details.
83 * Included the resource files in the xz and xzdec build
84 rules. Building the command line tools is still
85 experimental but possible with MinGW-w64.
87 - Visual Studio: Added stream_decoder_mt.c to the project
88 files. Now the threaded decompressor lzma_stream_decoder_mt()
89 gets built. CMake-based build wasn't affected.
91 - Updated windows/INSTALL-MSVC.txt to mention that CMake-based
92 build is now the preferred method with Visual Studio. The
93 project files will probably be removed after 5.4.x releases.
95 - Changes to #defines in config.h:
97 * HAVE_DECL_CLOCK_MONOTONIC was replaced by
98 HAVE_CLOCK_MONOTONIC. The old macro was always defined
99 in configure-generated config.h to either 0 or 1. The
100 new macro is defined (to 1) only if the declaration of
101 CLOCK_MONOTONIC is available. This matches the way most
102 other config.h macros work and makes things simpler with
105 * HAVE_DECL_PROGRAM_INVOCATION_NAME was replaced by
106 HAVE_PROGRAM_INVOCATION_NAME for the same reason.
110 - Fixed test script compatibility with ancient /bin/sh
111 versions. Now the five test_compress_* tests should
112 no longer fail on Solaris 10.
114 - Added and refactored a few tests.
118 - Updated the Catalan and Esperanto translations.
120 - Added Korean and Ukrainian man page translations.
125 This bumps the minor version of liblzma because new features were
126 added. The API and ABI are still backward compatible with liblzma
131 * All fixes from 5.2.10.
133 * The ARM64 filter is now stable. The xz option is now --arm64.
134 Decompression requires XZ Utils 5.4.0. In the future the ARM64
135 filter will be supported by XZ for Java, XZ Embedded (including
136 the version in Linux), LZMA SDK, and 7-Zip.
140 - Updated Catalan, Croatian, German, Romanian, and Turkish
143 - Updated German man page translations.
145 - Added Romanian man page translations.
147 Summary of new features added in the 5.3.x development releases:
151 - Added threaded .xz decompressor lzma_stream_decoder_mt().
152 It can use multiple threads with .xz files that have multiple
153 Blocks with size information in Block Headers. The threaded
154 encoder in xz has always created such files.
156 Single-threaded encoder cannot store the size information in
157 Block Headers even if one used LZMA_FULL_FLUSH to create
158 multiple Blocks, so this threaded decoder cannot use multiple
159 threads with such files.
161 If there are multiple Streams (concatenated .xz files), one
162 Stream will be decompressed completely before starting the
165 - A new decoder flag LZMA_FAIL_FAST was added. It makes the
166 threaded decompressor report errors soon instead of first
167 flushing all pending data before the error location.
170 * LZMA_FILTER_ARM64 is for ARM64 binaries.
171 * LZMA_FILTER_LZMA1EXT is for raw LZMA1 streams that don't
172 necessarily use the end marker.
174 - Added lzma_str_to_filters(), lzma_str_from_filters(), and
175 lzma_str_list_filters() to convert a preset or a filter chain
176 string to a lzma_filter[] and vice versa. These should make
177 it easier to write applications that allow users to specify
178 custom compression options.
180 - Added lzma_filters_free() which can be convenient for freeing
181 the filter options in a filter chain (an array of lzma_filter
184 - lzma_file_info_decoder() to makes it a little easier to get
185 the Index field from .xz files. This helps in getting the
186 uncompressed file size but an easy-to-use random access
187 API is still missing which has existed in XZ for Java for
190 - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
191 It is used by erofs-utils and may be used by others too.
193 The MicroLZMA format is a raw LZMA stream (without end marker)
194 whose first byte (always 0x00) has been replaced with
195 bitwise-negation of the LZMA properties (lc/lp/pb). It was
196 created for use in EROFS but may be used in other contexts
197 as well where it is important to avoid wasting bytes for
198 stream headers or footers. The format is also supported by
199 XZ Embedded (the XZ Embedded version in Linux got MicroLZMA
200 support in Linux 5.16).
202 The MicroLZMA encoder API in liblzma can compress into a
203 fixed-sized output buffer so that as much data is compressed
204 as can be fit into the buffer while still creating a valid
205 MicroLZMA stream. This is needed for EROFS.
207 - Added lzma_lzip_decoder() to decompress the .lz (lzip) file
208 format version 0 and the original unextended version 1 files.
209 Also lzma_auto_decoder() supports .lz files.
211 - lzma_filters_update() can now be used with the multi-threaded
212 encoder (lzma_stream_encoder_mt()) to change the filter chain
213 after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
215 - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
216 finders that require at least 3 or 4. Now it is internally
217 rounded up if needed.
219 - CLMUL-based CRC64 on x86-64 and E2K with runtime processor
220 detection. On 32-bit x86 it currently isn't available unless
221 --disable-assembler is used which can make the non-CLMUL
222 CRC64 slower; this might be fixed in the future.
224 - Building with --disable-threads --enable-small
225 is now thread-safe if the compiler supports
226 __attribute__((__constructor__)).
230 - Using -T0 (--threads=0) will now use multi-threaded encoder
231 even on a single-core system. This is to ensure that output
232 from the same xz binary is identical on both single-core and
235 - --threads=+1 or -T+1 is now a way to put xz into
236 multi-threaded mode while using only one worker thread.
237 The + is ignored if the number is not 1.
239 - A default soft memory usage limit is now used for compression
240 when -T0 is used and no explicit limit has been specified.
241 This soft limit is used to restrict the number of threads
242 but if the limit is exceeded with even one thread then xz
243 will continue with one thread using the multi-threaded
244 encoder and this limit is ignored. If the number of threads
245 is specified manually then no default limit will be used;
246 this affects only -T0.
248 This change helps on systems that have very many cores and
249 using all of them for xz makes no sense. Previously xz -T0
250 could run out of memory on such systems because it attempted
251 to reserve memory for too many threads.
253 This also helps with 32-bit builds which don't have a large
254 amount of address space that would be required for many
255 threads. The default soft limit for -T0 is at most 1400 MiB
256 on all 32-bit platforms.
258 - Previously a low value in --memlimit-compress wouldn't cause
259 xz to switch from multi-threaded mode to single-threaded mode
260 if the limit cannot otherwise be met; xz failed instead. Now
261 xz can switch to single-threaded mode and then, if needed,
262 scale down the LZMA2 dictionary size too just like it already
263 did when it was started in single-threaded mode.
265 - The option --no-adjust no longer prevents xz from scaling down
266 the number of threads as that doesn't affect the compressed
267 output (only performance). Now --no-adjust only prevents
268 adjustments that affect compressed output, that is, with
269 --no-adjust xz won't switch from multi-threaded mode to
270 single-threaded mode and won't scale down the LZMA2
273 - Added a new option --memlimit-mt-decompress=LIMIT. This is
274 used to limit the number of decompressor threads (possibly
275 falling back to single-threaded mode) but it will never make
276 xz refuse to decompress a file. This has a system-specific
277 default value because without any limit xz could end up
278 allocating memory for the whole compressed input file, the
279 whole uncompressed output file, multiple thread-specific
280 decompressor instances and so on. Basically xz could
281 attempt to use an insane amount of memory even with fairly
282 common files. The system-specific default value is currently
283 the same as the one used for compression with -T0.
285 The new option works together with the existing option
286 --memlimit-decompress=LIMIT. The old option sets a hard limit
287 that must not be exceeded (xz will refuse to decompress)
288 while the new option only restricts the number of threads.
289 If the limit set with --memlimit-mt-decompress is greater
290 than the limit set with --memlimit-compress, then the latter
291 value is used also for --memlimit-mt-decompress.
293 - Added new information to the output of xz --info-memory and
294 new fields to the output of xz --robot --info-memory.
296 - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
297 now that liblzma handles it.
299 - Don't mention endianness for ARM and ARM-Thumb filters in
300 --long-help. The filters only work for little endian
301 instruction encoding but modern ARM processors using
302 big endian data access still use little endian
303 instruction encoding. So the help text was misleading.
304 In contrast, the PowerPC filter is only for big endian
305 32/64-bit PowerPC code. Little endian PowerPC would need
308 - Added decompression support for the .lz (lzip) file format
309 version 0 and the original unextended version 1. It is
310 autodetected by default. See also the option --format on
313 - Sandboxing enabled by default:
315 * pledge(2) (OpenBSD)
317 * Scripts now support the .lz format using xz.
319 * A few new tests were added.
321 * The liblzma-specific tests are now supported in CMake-based
322 builds too ("make test").
325 5.3.5beta (2022-12-01)
327 * All fixes from 5.2.9.
331 - Added new LZMA_FILTER_LZMA1EXT for raw encoder and decoder to
332 handle raw LZMA1 streams that don't have end of payload marker
333 (EOPM) alias end of stream (EOS) marker. It can be used in
334 filter chains, for example, with the x86 BCJ filter.
336 - Added lzma_str_to_filters(), lzma_str_from_filters(), and
337 lzma_str_list_filters() to make it easier for applications
338 to get custom compression options from a user and convert
339 it to an array of lzma_filter structures.
341 - Added lzma_filters_free().
343 - lzma_filters_update() can now be used with the multi-threaded
344 encoder (lzma_stream_encoder_mt()) to change the filter chain
345 after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
347 - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
348 finders that require at least 3 or 4. Now it is internally
349 rounded up if needed.
351 - ARM64 filter was modified. It is still experimental.
353 - Fixed LTO build with Clang if -fgnuc-version=10 or similar
354 was used to make Clang look like GCC >= 10. Now it uses
355 __has_attribute(__symver__) which should be reliable.
359 - --threads=+1 or -T+1 is now a way to put xz into multi-threaded
360 mode while using only one worker thread.
362 - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
363 now that liblzma handles it.
365 * Updated translations: Chinese (simplified), Korean, and Turkish.
368 5.3.4alpha (2022-11-15)
370 * All fixes from 5.2.7 and 5.2.8.
374 - Minor improvements to the threaded decoder.
376 - Added CRC64 implementation that uses SSSE3, SSE4.1, and CLMUL
377 instructions on 32/64-bit x86 and E2K. On 32-bit x86 it's
378 not enabled unless --disable-assembler is used but then
379 the non-CLMUL code might be slower. Processor support is
380 detected at runtime so this is built by default on x86-64
381 and E2K. On these platforms, if compiler flags indicate
382 unconditional CLMUL support (-msse4.1 -mpclmul) then the
383 generic version is not built, making liblzma 8-9 KiB smaller
384 compared to having both versions included.
386 With extremely compressible files this can make decompression
387 up to twice as fast but with typical files 5 % improvement
388 is a more realistic expectation.
390 The CLMUL version is slower than the generic version with
391 tiny inputs (especially at 1-8 bytes per call, but up to
392 16 bytes). In normal use in xz this doesn't matter at all.
394 - Added an experimental ARM64 filter. This is *not* the final
395 version! Files created with this experimental version won't
396 be supported in the future versions! The filter design is
397 a compromise where improving one use case makes some other
400 - Added decompression support for the .lz (lzip) file format
401 version 0 and the original unextended version 1. See the
402 API docs of lzma_lzip_decoder() for details. Also
403 lzma_auto_decoder() supports .lz files.
405 - Building with --disable-threads --enable-small
406 is now thread-safe if the compiler supports
407 __attribute__((__constructor__))
411 - Added support for OpenBSD's pledge(2) as a sandboxing method.
413 - Don't mention endianness for ARM and ARM-Thumb filters in
414 --long-help. The filters only work for little endian
415 instruction encoding but modern ARM processors using
416 big endian data access still use little endian
417 instruction encoding. So the help text was misleading.
418 In contrast, the PowerPC filter is only for big endian
419 32/64-bit PowerPC code. Little endian PowerPC would need
422 - Added --experimental-arm64. This will be renamed once the
423 filter is finished. Files created with this experimental
424 filter will not be supported in the future!
426 - Added new fields to the output of xz --robot --info-memory.
428 - Added decompression support for the .lz (lzip) file format
429 version 0 and the original unextended version 1. It is
430 autodetected by default. See also the option --format on
433 * Scripts now support the .lz format using xz.
437 - New #defines in config.h: HAVE_ENCODER_ARM64,
438 HAVE_DECODER_ARM64, HAVE_LZIP_DECODER, HAVE_CPUID_H,
439 HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR, HAVE_USABLE_CLMUL
441 - New configure options: --disable-clmul-crc,
442 --disable-microlzma, --disable-lzip-decoder, and
443 'pledge' is now an option in --enable-sandbox (but
444 it's autodetected by default anyway).
446 - INSTALL was updated to document the new configure options.
448 - PACKAGERS now lists also --disable-microlzma and
449 --disable-lzip-decoder as configure options that must
450 not be used in builds for non-embedded use.
454 - Fix some of the tests so that they skip instead of fail if
455 certain features have been disabled with configure options.
456 It's still not perfect.
458 - Other improvements to tests.
460 * Updated translations: Croatian, Finnish, Hungarian, Polish,
461 Romanian, Spanish, Swedish, and Ukrainian.
464 5.3.3alpha (2022-08-22)
466 * All fixes from 5.2.6.
470 - Fixed 32-bit build.
472 - Added threaded .xz decompressor lzma_stream_decoder_mt().
473 It can use multiple threads with .xz files that have multiple
474 Blocks with size information in Block Headers. The threaded
475 encoder in xz has always created such files.
477 Single-threaded encoder cannot store the size information in
478 Block Headers even if one used LZMA_FULL_FLUSH to create
479 multiple Blocks, so this threaded decoder cannot use multiple
480 threads with such files.
482 If there are multiple Streams (concatenated .xz files), one
483 Stream will be decompressed completely before starting the
486 - A new decoder flag LZMA_FAIL_FAST was added. It makes the
487 threaded decompressor report errors soon instead of first
488 flushing all pending data before the error location.
492 - Using -T0 (--threads=0) will now use multi-threaded encoder
493 even on a single-core system. This is to ensure that output
494 from the same xz binary is identical on both single-core and
497 - A default soft memory usage limit is now used for compression
498 when -T0 is used and no explicit limit has been specified.
499 This soft limit is used to restrict the number of threads
500 but if the limit is exceeded with even one thread then xz
501 will continue with one thread using the multi-threaded
502 encoder and this limit is ignored. If the number of threads
503 is specified manually then no default limit will be used;
504 this affects only -T0.
506 This change helps on systems that have very many cores and
507 using all of them for xz makes no sense. Previously xz -T0
508 could run out of memory on such systems because it attempted
509 to reserve memory for too many threads.
511 This also helps with 32-bit builds which don't have a large
512 amount of address space that would be required for many
513 threads. The default limit is 1400 MiB on all 32-bit
516 Now xz -T0 should just work. It might use too few threads
517 in some cases but at least it shouldn't easily run out of
518 memory. It's possible that this will be tweaked before 5.4.0.
520 - Changes to --memlimit-compress and --no-adjust:
522 In single-threaded mode, --memlimit-compress can make xz
523 scale down the LZMA2 dictionary size to meet the memory usage
524 limit. This obviously affects the compressed output. However,
525 if xz was in threaded mode, --memlimit-compress could make xz
526 reduce the number of threads but it wouldn't make xz switch
527 from multi-threaded mode to single-threaded mode or scale
528 down the LZMA2 dictionary size. This seemed illogical.
530 Now --memlimit-compress can make xz switch to single-threaded
531 mode if one thread in multi-threaded mode uses too much
532 memory. If memory usage is still too high, then the LZMA2
533 dictionary size can be scaled down too.
535 The option --no-adjust was also changed so that it no longer
536 prevents xz from scaling down the number of threads as that
537 doesn't affect compressed output (only performance). After
538 this commit --no-adjust only prevents adjustments that affect
539 compressed output, that is, with --no-adjust xz won't switch
540 from multithreaded mode to single-threaded mode and won't
541 scale down the LZMA2 dictionary size.
543 - Added a new option --memlimit-mt-decompress=LIMIT. This is
544 used to limit the number of decompressor threads (possibly
545 falling back to single-threaded mode) but it will never make
546 xz refuse to decompress a file. This has a system-specific
547 default value because without any limit xz could end up
548 allocating memory for the whole compressed input file, the
549 whole uncompressed output file, multiple thread-specific
550 decompressor instances and so on. Basically xz could
551 attempt to use an insane amount of memory even with fairly
554 The new option works together with the existing option
555 --memlimit-decompress=LIMIT. The old option sets a hard limit
556 that must not be exceeded (xz will refuse to decompress)
557 while the new option only restricts the number of threads.
558 If the limit set with --memlimit-mt-decompress is greater
559 than the limit set with --memlimit-compress, then the latter
560 value is used also for --memlimit-mt-decompress.
564 - Added a few more tests.
566 - Added tests/code_coverage.sh to create a code coverage report
571 - Automake's parallel test harness is now used to make tests
574 - Added the CMake files to the distribution tarball. These were
575 supposed to be in 5.2.5 already.
577 - Added liblzma tests to the CMake build.
579 - Windows: Fix building of liblzma.dll with the included
580 Visual Studio project files.
583 5.3.2alpha (2021-10-28)
585 This release was made on short notice so that recent erofs-utils can
586 be built with LZMA support without needing a snapshot from xz.git.
587 Thus many pending things were not included, not even updated
588 translations (which would need to be updated for the new --list
591 * All fixes from 5.2.5.
595 - When copying metadata from the source file to the destination
596 file, don't try to set the group (GID) if it is already set
597 correctly. This avoids a failure on OpenBSD (and possibly on
598 a few other OSes) where files may get created so that their
599 group doesn't belong to the user, and fchown(2) can fail even
600 if it needs to do nothing.
602 - The --keep option now accepts symlinks, hardlinks, and
603 setuid, setgid, and sticky files. Previously this required
606 - Split the long strings used in --list and --info-memory modes
607 to make them much easier for translators.
609 - If built with sandbox support and enabling the sandbox fails,
610 xz will now immediately exit with exit status of 1. Previously
611 it would only display a warning if -vv was used.
613 - Cap --memlimit-compress to 2000 MiB on MIPS32 because on
614 MIPS32 userspace processes are limited to 2 GiB of address
619 - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
620 The API is in lzma/container.h.
622 The MicroLZMA format is a raw LZMA stream (without end marker)
623 whose first byte (always 0x00) has been replaced with
624 bitwise-negation of the LZMA properties (lc/lp/pb). It was
625 created for use in EROFS but may be used in other contexts
626 as well where it is important to avoid wasting bytes for
627 stream headers or footers. The format is also supported by
630 The MicroLZMA encoder API in liblzma can compress into a
631 fixed-sized output buffer so that as much data is compressed
632 as can be fit into the buffer while still creating a valid
633 MicroLZMA stream. This is needed for EROFS.
635 - Added fuzzing support.
637 - Support Intel Control-flow Enforcement Technology (CET) in
638 32-bit x86 assembly files.
640 - Visual Studio: Use non-standard _MSVC_LANG to detect C++
641 standard version in the lzma.h API header. It's used to
642 detect when "noexcept" can be used.
646 - Fix exit status of xzdiff/xzcmp. Exit status could be 2 when
647 the correct value is 1.
649 - Fix exit status of xzgrep.
651 - Detect corrupt .bz2 files in xzgrep.
653 - Add zstd support to xzgrep and xzdiff/xzcmp.
655 - Fix less(1) version detection in xzless. It failed if the
656 version number from "less -V" contained a dot.
658 * Fix typos and technical issues in man pages.
662 - Windows: Fix building of resource files when config.h isn't
663 used. CMake + Visual Studio can now build liblzma.dll.
665 - Various fixes to the CMake support. It might still need a few
666 more fixes even for liblzma-only builds.
669 5.3.1alpha (2018-04-29)
671 * All fixes from 5.2.4.
673 * Add lzma_file_info_decoder() into liblzma and use it in xz to
674 implement the --list feature.
676 * Capsicum sandbox support is enabled by default where available
682 * xz: Don't modify argv[] when parsing the --memlimit* and
683 --block-list command line options. This fixes confusing
684 arguments in process listing (like "ps auxf").
686 * GNU/Linux only: Use __has_attribute(__symver__) to detect if
687 that attribute is supported. This fixes build on Mandriva where
688 Clang is patched to define __GNUC__ to 11 by default (instead
689 of 4 as used by Clang upstream).
696 - Fixed an infinite loop in LZMA encoder initialization
697 if dict_size >= 2 GiB. (The encoder only supports up
700 - Fixed two cases of invalid free() that can happen if
701 a tiny allocation fails in encoder re-initialization
702 or in lzma_filters_update(). These bugs had some
703 similarities with the bug fixed in 5.2.7.
705 - Fixed lzma_block_encoder() not allowing the use of
706 LZMA_SYNC_FLUSH with lzma_code() even though it was
707 documented to be supported. The sync-flush code in
708 the Block encoder was already used internally via
709 lzma_stream_encoder(), so this was just a missing flag
710 in the lzma_block_encoder() API function.
712 - GNU/Linux only: Don't put symbol versions into static
713 liblzma as it breaks things in some cases (and even if
714 it didn't break anything, symbol versions in static
715 libraries are useless anyway). The downside of the fix
716 is that if the configure options --with-pic or --without-pic
717 are used then it's not possible to build both shared and
718 static liblzma at the same time on GNU/Linux anymore;
719 with those options --disable-static or --disable-shared
722 * New email address for bug reports is <xz@tukaani.org> which
723 forwards messages to Lasse Collin and Jia Tan.
730 - If xz cannot remove an input file when it should, this
731 is now treated as a warning (exit status 2) instead of
732 an error (exit status 1). This matches GNU gzip and it
733 is more logical as at that point the output file has
734 already been successfully closed.
736 - Fix handling of .xz files with an unsupported check type.
737 Previously such printed a warning message but then xz
738 behaved as if an error had occurred (didn't decompress,
739 exit status 1). Now a warning is printed, decompression
740 is done anyway, and exit status is 2. This used to work
741 slightly before 5.0.0. In practice this bug matters only
742 if xz has been built with some check types disabled. As
743 instructed in PACKAGERS, such builds should be done in
744 special situations only.
746 - Fix "xz -dc --single-stream tests/files/good-0-empty.xz"
747 which failed with "Internal error (bug)". That is,
748 --single-stream was broken if the first .xz stream in
749 the input file didn't contain any uncompressed data.
751 - Fix displaying file sizes in the progress indicator when
752 working in passthru mode and there are multiple input files.
753 Just like "gzip -cdf", "xz -cdf" works like "cat" when the
754 input file isn't a supported compressed file format. In
755 this case the file size counters weren't reset between
756 files so with multiple input files the progress indicator
757 displayed an incorrect (too large) value.
761 - API docs in lzma/container.h:
762 * Update the list of decoder flags in the decoder
764 * Explain LZMA_CONCATENATED behavior with .lzma files
765 in lzma_auto_decoder() docs.
767 - OpenBSD: Use HW_NCPUONLINE to detect the number of
768 available hardware threads in lzma_physmem().
770 - Fix use of wrong macro to detect x86 SSE2 support.
771 __SSE2_MATH__ was used with GCC/Clang but the correct
772 one is __SSE2__. The first one means that SSE2 is used
773 for floating point math which is irrelevant here.
774 The affected SSE2 code isn't used on x86-64 so this affects
775 only 32-bit x86 builds that use -msse2 without -mfpmath=sse
776 (there is no runtime detection for SSE2). It improves LZMA
777 compression speed (not decompression).
779 - Fix the build with Intel C compiler 2021 (ICC, not ICX)
780 on Linux. It defines __GNUC__ to 10 but doesn't support
781 the __symver__ attribute introduced in GCC 10.
783 * Scripts: Ignore warnings from xz by using --quiet --no-warn.
784 This is needed if the input .xz files use an unsupported
789 - Updated Croatian and Turkish translations.
791 - One new translations wasn't included because it needed
792 technical fixes. It will be in upcoming 5.4.0. No new
793 translations will be added to the 5.2.x branch anymore.
795 - Renamed the French man page translation file from
796 fr_FR.po to fr.po and thus also its install directory
797 (like /usr/share/man/fr_FR -> .../fr).
799 - Man page translations for upcoming 5.4.0 are now handled
800 in the Translation Project.
802 * Update doc/faq.txt a little so it's less out-of-date.
809 - Made lzma_filters_copy() to never modify the destination
810 array if an error occurs. lzma_stream_encoder() and
811 lzma_stream_encoder_mt() already assumed this. Before this
812 change, if a tiny memory allocation in lzma_filters_copy()
813 failed it would lead to a crash (invalid free() or invalid
814 memory reads) in the cleanup paths of these two encoder
815 initialization functions.
817 - Added missing integer overflow check to lzma_index_append().
818 This affects xz --list and other applications that decode
819 the Index field from .xz files using lzma_index_decoder().
820 Normal decompression of .xz files doesn't call this code
821 and thus most applications using liblzma aren't affected
824 - Single-threaded .xz decoder (lzma_stream_decoder()): If
825 lzma_code() returns LZMA_MEMLIMIT_ERROR it is now possible
826 to use lzma_memlimit_set() to increase the limit and continue
827 decoding. This was supposed to work from the beginning
828 but there was a bug. With other decoders (.lzma or
829 threaded .xz decoder) this already worked correctly.
831 - Fixed accumulation of integrity check type statistics in
832 lzma_index_cat(). This bug made lzma_index_checks() return
833 only the type of the integrity check of the last Stream
834 when multiple lzma_indexes were concatenated. Most
835 applications don't use these APIs but in xz it made
836 xz --list not list all check types from concatenated .xz
837 files. In xz --list --verbose only the per-file "Check:"
838 lines were affected and in xz --robot --list only the "file"
841 - Added ABI compatibility with executables that were linked
842 against liblzma in RHEL/CentOS 7 or other liblzma builds
843 that had copied the problematic patch from RHEL/CentOS 7
844 (xz-5.2.2-compat-libs.patch). For the details, see the
845 comment at the top of src/liblzma/validate_map.sh.
847 WARNING: This uses __symver__ attribute with GCC >= 10.
848 In other cases the traditional __asm__(".symver ...")
849 is used. Using link-time optimization (LTO, -flto) with
850 GCC versions older than 10 can silently result in
851 broken liblzma.so.5 (incorrect symbol versions)! If you
852 want to use -flto with GCC, you must use GCC >= 10.
853 LTO with Clang seems to work even with the traditional
854 __asm__(".symver ...") method.
856 * xzgrep: Fixed compatibility with old shells that break if
857 comments inside command substitutions have apostrophes (').
858 This problem was introduced in 5.2.6.
862 - New #define in config.h: HAVE_SYMBOL_VERSIONS_LINUX
864 - Windows: Fixed liblzma.dll build with Visual Studio project
865 files. It broke in 5.2.6 due to a change that was made to
866 improve CMake support.
868 - Windows: Building liblzma with UNICODE defined should now
871 - CMake files are now actually included in the release tarball.
872 They should have been in 5.2.5 already.
874 - Minor CMake fixes and improvements.
876 * Added a new translation: Turkish
883 - The --keep option now accepts symlinks, hardlinks, and
884 setuid, setgid, and sticky files. Previously this required
887 - When copying metadata from the source file to the destination
888 file, don't try to set the group (GID) if it is already set
889 correctly. This avoids a failure on OpenBSD (and possibly on
890 a few other OSes) where files may get created so that their
891 group doesn't belong to the user, and fchown(2) can fail even
892 if it needs to do nothing.
894 - Cap --memlimit-compress to 2000 MiB instead of 4020 MiB on
895 MIPS32 because on MIPS32 userspace processes are limited
896 to 2 GiB of address space.
900 - Fixed a missing error-check in the threaded encoder. If a
901 small memory allocation fails, a .xz file with an invalid
902 Index field would be created. Decompressing such a file would
903 produce the correct output but result in an error at the end.
904 Thus this is a "mild" data corruption bug. Note that while
905 a failed memory allocation can trigger the bug, it cannot
906 cause invalid memory access.
908 - The decoder for .lzma files now supports files that have
909 uncompressed size stored in the header and still use the
910 end of payload marker (end of stream marker) at the end
911 of the LZMA stream. Such files are rare but, according to
912 the documentation in LZMA SDK, they are valid.
913 doc/lzma-file-format.txt was updated too.
915 - Improved 32-bit x86 assembly files:
916 * Support Intel Control-flow Enforcement Technology (CET)
917 * Use non-executable stack on FreeBSD.
919 - Visual Studio: Use non-standard _MSVC_LANG to detect C++
920 standard version in the lzma.h API header. It's used to
921 detect when "noexcept" can be used.
925 - Fixed arbitrary command injection via a malicious filename
926 (CVE-2022-1271, ZDI-CAN-16587). A standalone patch for
927 this was released to the public on 2022-04-07. A slight
928 robustness improvement has been made since then and, if
929 using GNU or *BSD grep, a new faster method is now used
930 that doesn't use the old sed-based construct at all. This
931 also fixes bad output with GNU grep >= 3.5 (2020-09-27)
932 when xzgrepping binary files.
934 This vulnerability was discovered by:
935 cleemy desu wayo working with Trend Micro Zero Day Initiative
937 - Fixed detection of corrupt .bz2 files.
939 - Improved error handling to fix exit status in some situations
940 and to fix handling of signals: in some situations a signal
941 didn't make xzgrep exit when it clearly should have. It's
942 possible that the signal handling still isn't quite perfect
943 but hopefully it's good enough.
945 - Documented exit statuses on the man page.
947 - xzegrep and xzfgrep now use "grep -E" and "grep -F" instead
948 of the deprecated egrep and fgrep commands.
950 - Fixed parsing of the options -E, -F, -G, -P, and -X. The
951 problem occurred when multiple options were specied in
952 a single argument, for example,
954 echo foo | xzgrep -Fe foo
956 treated foo as a filename because -Fe wasn't correctly
959 - Added zstd support.
963 - Fixed wrong exit status. Exit status could be 2 when the
966 - Documented on the man page that exit status of 2 is used
967 for decompression errors.
969 - Added zstd support.
973 - Fix less(1) version detection. It failed if the version number
974 from "less -V" contained a dot.
978 - Added new translations: Catalan, Croatian, Esperanto,
979 Korean, Portuguese, Romanian, Serbian, Spanish, Swedish,
982 - Updated the Brazilian Portuguese translation.
984 - Added French man page translation. This and the existing
985 German translation aren't complete anymore because the
986 English man pages got a few updates and the translators
987 weren't reached so that they could update their work.
991 - Windows: Fix building of resource files when config.h isn't
992 used. CMake + Visual Studio can now build liblzma.dll.
994 - Various fixes to the CMake support. Building static or shared
995 liblzma should work fine in most cases. In contrast, building
996 the command line tools with CMake is still clearly incomplete
997 and experimental and should be used for testing only.
1004 - Fixed several C99/C11 conformance bugs. Now the code is clean
1005 under gcc/clang -fsanitize=undefined. Some of these changes
1006 might have a negative effect on performance with old GCC
1007 versions or compilers other than GCC and Clang. The configure
1008 option --enable-unsafe-type-punning can be used to (mostly)
1009 restore the old behavior but it shouldn't normally be used.
1011 - Improved API documentation of lzma_properties_decode().
1013 - Added a very minor encoder speed optimization.
1017 - Fixed a crash in "xz -dcfv not_an_xz_file". All four options
1018 were required to trigger it. The crash occurred in the
1019 progress indicator code when xz was in passthru mode where
1020 xz works like "cat".
1022 - Fixed an integer overflow with 32-bit off_t. It could happen
1023 when decompressing a file that has a long run of zero bytes
1024 which xz would try to write as a sparse file. Since the build
1025 system enables large file support by default, off_t is
1026 normally 64-bit even on 32-bit systems.
1028 - Fixes for --flush-timeout:
1029 * Fix semi-busy-waiting.
1030 * Avoid unneeded flushes when no new input has arrived
1031 since the previous flush was completed.
1033 - Added a special case for 32-bit xz: If --memlimit-compress is
1034 used to specify a limit that exceeds 4020 MiB, the limit will
1035 be set to 4020 MiB. The values "0" and "max" aren't affected
1036 by this and neither is decompression. This hack can be
1037 helpful when a 32-bit xz has access to 4 GiB address space
1038 but the specified memlimit exceeds 4 GiB. This can happen
1039 e.g. with some scripts.
1041 - Capsicum sandbox is now enabled by default where available
1042 (FreeBSD >= 10). The sandbox debug messages (xz -vv) were
1043 removed since they seemed to be more annoying than useful.
1045 - DOS build now requires DJGPP 2.05 instead of 2.04beta.
1046 A workaround for a locale problem with DJGPP 2.05 was added.
1048 * xzgrep and other scripts:
1050 - Added a configure option --enable-path-for-scripts=PREFIX.
1051 It is disabled by default except on Solaris where the default
1052 is /usr/xpg4/bin. See INSTALL for details.
1054 - Added a workaround for a POSIX shell detection problem on
1059 - Added preliminary build instructions for z/OS. See INSTALL
1062 - Experimental CMake support was added. It should work to build
1063 static liblzma on a few operating systems. It may or may not
1064 work to build shared liblzma. On some platforms it can build
1065 xz and xzdec too but those are only for testing. See the
1066 comment in the beginning of CMakeLists.txt for details.
1068 - Visual Studio project files were updated.
1069 WindowsTargetPlatformVersion was removed from VS2017 files
1070 and set to "10.0" in the added VS2019 files. In the future
1071 the VS project files will be removed when CMake support is
1074 - New #defines in config.h: HAVE___BUILTIN_ASSUME_ALIGNED,
1075 HAVE___BUILTIN_BSWAPXX, and TUKLIB_USE_UNSAFE_TYPE_PUNNING.
1077 - autogen.sh has a new optional dependency on po4a and a new
1078 option --no-po4a to skip that step. This matters only if one
1079 wants to remake the build files. po4a is used to update the
1080 translated man pages but as long as the man pages haven't
1081 been modified, there's nothing to update and one can use
1082 --no-po4a to avoid the dependency on po4a.
1086 - XZ Utils translations are now handled by the Translation
1087 Project: https://translationproject.org/domain/xz.html
1089 - All man pages are now included in German too.
1091 - New xz translations: Brazilian Portuguese, Finnish,
1092 Hungarian, Chinese (simplified), Chinese (traditional),
1093 and Danish (partial translation)
1095 - Updated xz translations: French, German, Italian, and Polish
1097 - Unfortunately a few new xz translations weren't included due
1098 to technical problems like too long lines in --help output or
1099 misaligned column headings in tables. In the future, many of
1100 these strings will be split and e.g. the table column
1101 alignment will be handled in software. This should make the
1102 strings easier to translate.
1109 - Allow 0 as memory usage limit instead of returning
1110 LZMA_PROG_ERROR. Now 0 is treated as if 1 byte was specified,
1111 which effectively is the same as 0.
1113 - Use "noexcept" keyword instead of "throw()" in the public
1114 headers when a C++11 (or newer standard) compiler is used.
1116 - Added a portability fix for recent Intel C Compilers.
1118 - Microsoft Visual Studio build files have been moved under
1119 windows/vs2013 and windows/vs2017.
1123 - Fix "xz --list --robot missing_or_bad_file.xz" which would
1124 try to print an uninitialized string and thus produce garbage
1125 output. Since the exit status is non-zero, most uses of such
1126 a command won't try to interpret the garbage output.
1128 - "xz --list foo.xz" could print "Internal error (bug)" in a
1129 corner case where a specific memory usage limit had been set.
1136 - Always close a file before trying to delete it to avoid
1137 problems on some operating system and file system combinations.
1139 - Fixed copying of file timestamps on Windows.
1141 - Added experimental (disabled by default) sandbox support using
1142 Capsicum (FreeBSD >= 10). See --enable-sandbox in INSTALL.
1144 * C99/C11 conformance fixes to liblzma. The issues affected at least
1145 some builds using link-time optimizations.
1147 * Fixed bugs in the rarely-used function lzma_index_dup().
1149 * Use of external SHA-256 code is now disabled by default.
1150 It can still be enabled by passing --enable-external-sha256
1151 to configure. The reasons to disable it by default (see INSTALL
1154 - Some OS-specific SHA-256 implementations conflict with
1155 OpenSSL and cause problems in programs that link against both
1156 liblzma and libcrypto. At least FreeBSD 10 and MINIX 3.3.0
1159 - The internal SHA-256 is faster than the SHA-256 code in
1160 some operating systems.
1162 * Changed CPU core count detection to use sched_getaffinity() on
1163 GNU/Linux and GNU/kFreeBSD.
1165 * Fixes to the build-system and xz to make xz buildable even when
1166 encoders, decoders, or threading have been disabled from libilzma
1167 using configure options. These fixes added two new #defines to
1168 config.h: HAVE_ENCODERS and HAVE_DECODERS.
1173 * Fixed bugs in QNX-specific code.
1175 * Omitted the use of pipe2() even if it is available to avoid
1176 portability issues with some old Linux and glibc combinations.
1178 * Updated German translation.
1180 * Added project files to build static and shared liblzma (not the
1181 whole XZ Utils) with Visual Studio 2013 update 2 or later.
1183 * Documented that threaded decompression hasn't been implemented
1184 yet. A 5.2.0 NEWS entry describing multi-threading support had
1185 incorrectly said "decompression" when it should have said
1191 * Fixed a compression-ratio regression in fast mode of LZMA1 and
1192 LZMA2. The bug is present in 5.1.4beta and 5.2.0 releases.
1194 * Fixed a portability problem in xz that affected at least OpenBSD.
1196 * Fixed xzdiff to be compatible with FreeBSD's mktemp which differs
1197 from most other mktemp implementations.
1199 * Changed CPU core count detection to use cpuset_getaffinity() on
1207 * All fixes from 5.0.8
1209 * liblzma: Fixed lzma_stream_encoder_mt_memusage() when a preset
1212 * xzdiff: If mktemp isn't installed, mkdir will be used as
1213 a fallback to create a temporary directory. Installing mktemp
1214 is still recommended.
1216 * Updated French, German, Italian, Polish, and Vietnamese
1219 Summary of fixes and new features added in the 5.1.x development
1224 - Added support for multi-threaded compression. See the
1225 lzma_mt structure, lzma_stream_encoder_mt(), and
1226 lzma_stream_encoder_mt_memusage() in <lzma/container.h>,
1227 lzma_get_progress() in <lzma/base.h>, and lzma_cputhreads()
1228 in <lzma/hardware.h> for details.
1230 - Made the uses of lzma_allocator const correct.
1232 - Added lzma_block_uncomp_encode() to create uncompressed
1233 .xz Blocks using LZMA2 uncompressed chunks.
1235 - Added support for LZMA_IGNORE_CHECK.
1237 - A few speed optimizations were made.
1239 - Added support for symbol versioning. It is enabled by default
1240 on GNU/Linux, other GNU-based systems, and FreeBSD.
1242 - liblzma (not the whole XZ Utils) should now be buildable
1243 with MSVC 2013 update 2 or later using windows/config.h.
1247 - Fixed a race condition in the signal handling. It was
1248 possible that e.g. the first SIGINT didn't make xz exit
1249 if reading or writing blocked and one had bad luck. The fix
1250 is non-trivial, so as of writing it is unknown if it will be
1251 backported to the v5.0 branch.
1253 - Multi-threaded compression can be enabled with the
1254 --threads (-T) option.
1255 [Fixed: This originally said "decompression".]
1257 - New command line options in xz: --single-stream,
1258 --block-size=SIZE, --block-list=SIZES,
1259 --flush-timeout=TIMEOUT, and --ignore-check.
1261 - xz -lvv now shows the minimum xz version that is required to
1262 decompress the file. Currently it is 5.0.0 for all supported
1263 .xz files except files with empty LZMA2 streams require 5.0.2.
1265 * xzdiff and xzgrep now support .lzo files if lzop is installed.
1266 The .tzo suffix is also recognized as a shorthand for .tar.lzo.
1269 5.1.4beta (2014-09-14)
1271 * All fixes from 5.0.6
1273 * liblzma: Fixed the use of presets in threaded encoder
1276 * xz --block-list and --block-size can now be used together
1277 in single-threaded mode. Previously the combination only
1278 worked in multi-threaded mode.
1280 * Added support for LZMA_IGNORE_CHECK to liblzma and made it
1281 available in xz as --ignore-check.
1283 * liblzma speed optimizations:
1285 - Initialization of a new LZMA1 or LZMA2 encoder has been
1286 optimized. (The speed of reinitializing an already-allocated
1287 encoder isn't affected.) This helps when compressing many
1288 small buffers with lzma_stream_buffer_encode() and other
1289 similar situations where an already-allocated encoder state
1290 isn't reused. This speed-up is visible in xz too if one
1291 compresses many small files one at a time instead running xz
1292 once and giving all files as command-line arguments.
1294 - Buffer comparisons are now much faster when unaligned access
1295 is allowed (configured with --enable-unaligned-access). This
1296 speeds up encoding significantly. There is arch-specific code
1297 for 32-bit and 64-bit x86 (32-bit needs SSE2 for the best
1298 results and there's no run-time CPU detection for now).
1299 For other archs there is only generic code which probably
1300 isn't as optimal as arch-specific solutions could be.
1302 - A few speed optimizations were made to the SHA-256 code.
1303 (Note that the builtin SHA-256 code isn't used on all
1306 * liblzma can now be built with MSVC 2013 update 2 or later
1307 using windows/config.h.
1309 * Vietnamese translation was added.
1312 5.1.3alpha (2013-10-26)
1314 * All fixes from 5.0.5
1318 - Fixed a deadlock in the threaded encoder.
1320 - Made the uses of lzma_allocator const correct.
1322 - Added lzma_block_uncomp_encode() to create uncompressed
1323 .xz Blocks using LZMA2 uncompressed chunks.
1325 - Added support for native threads on Windows and the ability
1326 to detect the number of CPU cores.
1330 - Fixed a race condition in the signal handling. It was
1331 possible that e.g. the first SIGINT didn't make xz exit
1332 if reading or writing blocked and one had bad luck. The fix
1333 is non-trivial, so as of writing it is unknown if it will be
1334 backported to the v5.0 branch.
1336 - Made the progress indicator work correctly in threaded mode.
1338 - Threaded encoder now works together with --block-list=SIZES.
1340 - Added preliminary support for --flush-timeout=TIMEOUT.
1341 It can be useful for (somewhat) real-time streaming. For
1342 now the decompression side has to be done with something
1343 else than the xz tool due to how xz does buffering, but this
1347 5.1.2alpha (2012-07-04)
1349 * All fixes from 5.0.3 and 5.0.4
1353 - Fixed a deadlock and an invalid free() in the threaded encoder.
1355 - Added support for symbol versioning. It is enabled by default
1356 on GNU/Linux, other GNU-based systems, and FreeBSD.
1358 - Use SHA-256 implementation from the operating system if one is
1359 available in libc, libmd, or libutil. liblzma won't use e.g.
1360 OpenSSL or libgcrypt to avoid introducing new dependencies.
1362 - Fixed liblzma.pc for static linking.
1364 - Fixed a few portability bugs.
1366 * xz --decompress --single-stream now fixes the input position after
1367 successful decompression. Now the following works:
1369 echo foo | xz > foo.xz
1370 echo bar | xz >> foo.xz
1371 ( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
1373 Note that it doesn't work if the input is not seekable
1374 or if there is Stream Padding between the concatenated
1377 * xz -lvv now shows the minimum xz version that is required to
1378 decompress the file. Currently it is 5.0.0 for all supported .xz
1379 files except files with empty LZMA2 streams require 5.0.2.
1381 * Added an *incomplete* implementation of --block-list=SIZES to xz.
1382 It only works correctly in single-threaded mode and when
1383 --block-size isn't used at the same time. --block-list allows
1384 specifying the sizes of Blocks which can be useful e.g. when
1385 creating files for random-access reading.
1388 5.1.1alpha (2011-04-12)
1390 * All fixes from 5.0.2
1392 * liblzma fixes that will also be included in 5.0.3:
1394 - A memory leak was fixed.
1396 - lzma_stream_buffer_encode() no longer creates an empty .xz
1397 Block if encoding an empty buffer. Such an empty Block with
1398 LZMA2 data would trigger a bug in 5.0.1 and older (see the
1399 first bullet point in 5.0.2 notes). When releasing 5.0.2,
1400 I thought that no encoder creates this kind of files but
1403 - Validate function arguments better in a few functions. Most
1404 importantly, specifying an unsupported integrity check to
1405 lzma_stream_buffer_encode() no longer creates a corrupt .xz
1406 file. Probably no application tries to do that, so this
1407 shouldn't be a big problem in practice.
1409 - Document that lzma_block_buffer_encode(),
1410 lzma_easy_buffer_encode(), lzma_stream_encoder(), and
1411 lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
1413 - The return values of the _memusage() functions are now
1416 * Support for multithreaded compression was added using the simplest
1417 method, which splits the input data into blocks and compresses
1418 them independently. Other methods will be added in the future.
1419 The current method has room for improvement, e.g. it is possible
1420 to reduce the memory usage.
1422 * Added the options --single-stream and --block-size=SIZE to xz.
1424 * xzdiff and xzgrep now support .lzo files if lzop is installed.
1425 The .tzo suffix is also recognized as a shorthand for .tar.lzo.
1427 * Support for short 8.3 filenames under DOS was added to xz. It is
1428 experimental and may change before it gets into a stable release.
1433 * Fixed an old bug in xzgrep that affected OpenBSD and probably
1434 a few other operating systems too.
1436 * Updated French and German translations.
1438 * Added support for detecting the amount of RAM on AmigaOS/AROS.
1440 * Minor build system updates.
1445 * Fix regressions introduced in 5.0.6:
1447 - Fix building with non-GNU make.
1449 - Fix invalid Libs.private value in liblzma.pc which broke
1450 static linking against liblzma if the linker flags were
1451 taken from pkg-config.
1456 * xzgrep now exits with status 0 if at least one file matched.
1458 * A few minor portability and build system fixes
1463 * lzmadec and liblzma's lzma_alone_decoder(): Support decompressing
1464 .lzma files that have less common settings in the headers
1465 (dictionary size other than 2^n or 2^n + 2^(n-1), or uncompressed
1466 size greater than 256 GiB). The limitations existed to avoid false
1467 positives when detecting .lzma files. The lc + lp <= 4 limitation
1468 still remains since liblzma's LZMA decoder has that limitation.
1470 NOTE: xz's .lzma support or liblzma's lzma_auto_decoder() are NOT
1471 affected by this change. They still consider uncommon .lzma headers
1472 as not being in the .lzma format. Changing this would give way too
1473 many false positives.
1477 - Interaction of preset and custom filter chain options was
1478 made less illogical. This affects only certain less typical
1479 uses cases so few people are expected to notice this change.
1481 Now when a custom filter chain option (e.g. --lzma2) is
1482 specified, all preset options (-0 ... -9, -e) earlier are on
1483 the command line are completely forgotten. Similarly, when
1484 a preset option is specified, all custom filter chain options
1485 earlier on the command line are completely forgotten.
1487 Example 1: "xz -9 --lzma2=preset=5 -e" is equivalent to "xz -e"
1488 which is equivalent to "xz -6e". Earlier -e didn't put xz back
1489 into preset mode and thus the example command was equivalent
1490 to "xz --lzma2=preset=5".
1492 Example 2: "xz -9e --lzma2=preset=5 -7" is equivalent to
1493 "xz -7". Earlier a custom filter chain option didn't make
1494 xz forget the -e option so the example was equivalent to
1497 - Fixes and improvements to error handling.
1499 - Various fixes to the man page.
1501 * xzless: Fixed to work with "less" versions 448 and later.
1503 * xzgrep: Made -h an alias for --no-filename.
1505 * Include the previously missing debug/translation.bash which can
1506 be useful for translators.
1508 * Include a build script for Mac OS X. This has been in the Git
1509 repository since 2010 but due to a mistake in Makefile.am the
1510 script hasn't been included in a release tarball before.
1517 - Fix lzma_index_init(). It could crash if memory allocation
1520 - Fix the possibility of an incorrect LZMA_BUF_ERROR when a BCJ
1521 filter is used and the application only provides exactly as
1522 much output space as is the uncompressed size of the file.
1524 - Fix a bug in doc/examples_old/xz_pipe_decompress.c. It didn't
1525 check if the last call to lzma_code() really returned
1526 LZMA_STREAM_END, which made the program think that truncated
1529 - New example programs in doc/examples (old programs are now in
1530 doc/examples_old). These have more comments and more detailed
1533 * Fix "xz -lvv foo.xz". It could crash on some corrupted files.
1535 * Fix output of "xz --robot -lv" and "xz --robot -lvv" which
1536 incorrectly printed the filename also in the "foo (x/x)" format.
1538 * Fix exit status of "xzdiff foo.xz bar.xz".
1540 * Fix exit status of "xzgrep foo binary_file".
1542 * Fix portability to EBCDIC systems.
1544 * Fix a configure issue on AIX with the XL C compiler. See INSTALL
1547 * Update French, German, Italian, and Polish translations.
1554 - A memory leak was fixed.
1556 - lzma_stream_buffer_encode() no longer creates an empty .xz
1557 Block if encoding an empty buffer. Such an empty Block with
1558 LZMA2 data would trigger a bug in 5.0.1 and older (see the
1559 first bullet point in 5.0.2 notes). When releasing 5.0.2,
1560 I thought that no encoder creates this kind of files but
1563 - Validate function arguments better in a few functions. Most
1564 importantly, specifying an unsupported integrity check to
1565 lzma_stream_buffer_encode() no longer creates a corrupt .xz
1566 file. Probably no application tries to do that, so this
1567 shouldn't be a big problem in practice.
1569 - Document that lzma_block_buffer_encode(),
1570 lzma_easy_buffer_encode(), lzma_stream_encoder(), and
1571 lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
1573 - The return values of the _memusage() functions are now
1576 * Fix command name detection in xzgrep. xzegrep and xzfgrep now
1577 correctly use egrep and fgrep instead of grep.
1579 * French translation was added.
1584 * LZMA2 decompressor now correctly accepts LZMA2 streams with no
1585 uncompressed data. Previously it considered them corrupt. The
1586 bug can affect applications that use raw LZMA2 streams. It is
1587 very unlikely to affect .xz files because no compressor creates
1588 .xz files with empty LZMA2 streams. (Empty .xz files are a
1589 different thing than empty LZMA2 streams.)
1591 * "xz --suffix=.foo filename.foo" now refuses to compress the
1592 file due to it already having the suffix .foo. It was already
1593 documented on the man page, but the code lacked the test.
1595 * "xzgrep -l foo bar.xz" works now.
1597 * Polish translation was added.
1602 * xz --force now (de)compresses files that have setuid, setgid,
1603 or sticky bit set and files that have multiple hard links.
1604 The man page had it documented this way already, but the code
1607 * gzip and bzip2 support in xzdiff was fixed.
1611 * Minor fix to Czech translation
1616 Only the most important changes compared to 4.999.9beta are listed
1617 here. One change is especially important:
1619 * The memory usage limit is now disabled by default. Some scripts
1620 written before this change may have used --memory=max on xz command
1621 line or in XZ_OPT. THESE USES OF --memory=max SHOULD BE REMOVED
1622 NOW, because they interfere with user's ability to set the memory
1623 usage limit himself. If user-specified limit causes problems to
1624 your script, blame the user.
1626 Other significant changes:
1628 * Added support for XZ_DEFAULTS environment variable. This variable
1629 allows users to set default options for xz, e.g. default memory
1630 usage limit or default compression level. Scripts that use xz
1631 must never set or unset XZ_DEFAULTS. Scripts should use XZ_OPT
1632 instead if they need a way to pass options to xz via an
1633 environment variable.
1635 * The compression settings associated with the preset levels
1636 -0 ... -9 have been changed. --extreme was changed a little too.
1637 It is now less likely to make compression worse, but with some
1638 files the new --extreme may compress slightly worse than the old
1641 * If a preset level (-0 ... -9) is specified after a custom filter
1642 chain options have been used (e.g. --lzma2), the custom filter
1643 chain will be forgotten. Earlier the preset options were
1644 completely ignored after custom filter chain options had been
1647 * xz will create sparse files when decompressing if the uncompressed
1648 data contains long sequences of binary zeros. This is done even
1649 when writing to standard output that is connected to a regular
1650 file and certain additional conditions are met to make it safe.
1652 * Support for "xz --list" was added. Combine with --verbose or
1653 --verbose --verbose (-vv) for detailed output.
1655 * I had hoped that liblzma API would have been stable after
1656 4.999.9beta, but there have been a couple of changes in the
1657 advanced features, which don't affect most applications:
1659 - Index handling code was revised. If you were using the old
1660 API, you will get a compiler error (so it's easy to notice).
1662 - A subtle but important change was made to the Block handling
1663 API. lzma_block.version has to be initialized even for
1664 lzma_block_header_decode(). Code that doesn't do it will work
1665 for now, but might break in the future, which makes this API
1666 change easy to miss.
1668 * The major soname has been bumped to 5.0.0. liblzma API and ABI
1669 are now stable, so the need to recompile programs linking against
1670 liblzma shouldn't arise soon.