]> git.ipfire.org Git - thirdparty/xz.git/log
thirdparty/xz.git
2 years agoxz: Omit the special notes about ARM64 filter on the man page.
Lasse Collin [Thu, 1 Dec 2022 16:13:27 +0000 (18:13 +0200)] 
xz: Omit the special notes about ARM64 filter on the man page.

2 years agoliblzma: Don't be over-specific in lzma_str_to_filters API doc.
Lasse Collin [Thu, 1 Dec 2022 16:12:03 +0000 (18:12 +0200)] 
liblzma: Don't be over-specific in lzma_str_to_filters API doc.

2 years agoliblzma: Silence unused variable warning when BCJ filters are disabled.
Lasse Collin [Thu, 1 Dec 2022 15:54:23 +0000 (17:54 +0200)] 
liblzma: Silence unused variable warning when BCJ filters are disabled.

Thanks to Jia Tan for the original patch.

2 years agoTranslations: Update the Chinese (simplified) translation.
Lasse Collin [Thu, 1 Dec 2022 15:38:03 +0000 (17:38 +0200)] 
Translations: Update the Chinese (simplified) translation.

2 years agoAdd NEWS for 5.2.9.
Lasse Collin [Wed, 30 Nov 2022 16:55:03 +0000 (18:55 +0200)] 
Add NEWS for 5.2.9.

2 years agoxz: Remove message_filters_to_str function prototype from message.h.
Jia Tan [Wed, 30 Nov 2022 15:33:08 +0000 (23:33 +0800)] 
xz: Remove message_filters_to_str function prototype from message.h.

This was forgotten from 7484744af6cbabe81e92af7d9e061dfd597fff7b.

2 years agoChange the bug report address.
Lasse Collin [Wed, 30 Nov 2022 16:08:34 +0000 (18:08 +0200)] 
Change the bug report address.

It forwards to me and Jia Tan.

Also update the IRC reference in README as #tukaani was moved
to Libera Chat long ago.

2 years agoBuild: Add string_conversion.c to CMake, DOS, and VS files.
Lasse Collin [Wed, 30 Nov 2022 15:50:17 +0000 (17:50 +0200)] 
Build: Add string_conversion.c to CMake, DOS, and VS files.

2 years agoUpdate to HTTPS URLs in AUTHORS.
Lasse Collin [Wed, 30 Nov 2022 15:38:32 +0000 (17:38 +0200)] 
Update to HTTPS URLs in AUTHORS.

2 years agoliblzma: Improve documentation for string to filter functions.
Jia Tan [Tue, 29 Nov 2022 16:52:06 +0000 (00:52 +0800)] 
liblzma: Improve documentation for string to filter functions.

2 years agoliblzma: Two fixes to lzma_str_list_filters() API docs.
Lasse Collin [Tue, 29 Nov 2022 20:27:42 +0000 (22:27 +0200)] 
liblzma: Two fixes to lzma_str_list_filters() API docs.

Thanks to Jia Tan.

2 years agoxz: Use lzma_str_from_filters().
Lasse Collin [Mon, 28 Nov 2022 19:57:47 +0000 (21:57 +0200)] 
xz: Use lzma_str_from_filters().

Two uses: Displaying encoder filter chain when compressing with -vv,
and displaying the decoder filter chain in --list -vv.

2 years agoliblzma: Add lzma_str_to_filters, _from_filters, and _list_filters.
Lasse Collin [Mon, 28 Nov 2022 19:37:48 +0000 (21:37 +0200)] 
liblzma: Add lzma_str_to_filters, _from_filters, and _list_filters.

lzma_str_to_filters() uses static error messages which makes
them not very precise. It tells the position in the string
where an error occurred though which helps quite a bit if
applications take advantage of it. Dynamic error messages can
be added later with a new flag if it seems important enough.

2 years agoliblzma: Make lzma_validate_chain() available outside filter_common.c.
Lasse Collin [Mon, 28 Nov 2022 19:02:19 +0000 (21:02 +0200)] 
liblzma: Make lzma_validate_chain() available outside filter_common.c.

2 years agoliblzma: Remove lzma_lz_decoder_uncompressed() as it's now unused.
Lasse Collin [Mon, 28 Nov 2022 08:51:03 +0000 (10:51 +0200)] 
liblzma: Remove lzma_lz_decoder_uncompressed() as it's now unused.

2 years agoliblzma: Use LZMA1EXT feature in lzma_microlzma_decoder().
Lasse Collin [Mon, 28 Nov 2022 08:48:53 +0000 (10:48 +0200)] 
liblzma: Use LZMA1EXT feature in lzma_microlzma_decoder().

Here too this avoids the slightly ugly method to set
the uncompressed size.

Also moved the setting of dict_size to the struct initializer.

2 years agoliblzma: Use LZMA1EXT feature in lzma_alone_decoder().
Lasse Collin [Mon, 28 Nov 2022 08:28:20 +0000 (10:28 +0200)] 
liblzma: Use LZMA1EXT feature in lzma_alone_decoder().

This avoids the need to use the slightly ugly method to
set the uncompressed size.

2 years agoliblzma: Add LZMA_FILTER_LZMA1EXT to support LZMA1 without end marker.
Lasse Collin [Sun, 27 Nov 2022 21:16:21 +0000 (23:16 +0200)] 
liblzma: Add LZMA_FILTER_LZMA1EXT to support LZMA1 without end marker.

Some file formats need support for LZMA1 streams that don't use
the end of payload marker (EOPM) alias end of stream (EOS) marker.
So far liblzma API has supported decompressing such streams via
lzma_alone_decoder() when .lzma header specifies a known
uncompressed size. Encoding support hasn't been available in the API.

Instead of adding a new LZMA1-only API for this purpose, this commit
adds a new filter ID for use with raw encoder and decoder. The main
benefit of this approach is that then also filter chains are possible,
for example, if someone wants to implement support for .7z files that
use the x86 BCJ filter with LZMA1 (not BCJ2 as that isn't supported
in liblzma).

2 years agoliblzma: Avoid unneeded use of void pointer in LZMA decoder.
Lasse Collin [Sun, 27 Nov 2022 16:43:07 +0000 (18:43 +0200)] 
liblzma: Avoid unneeded use of void pointer in LZMA decoder.

2 years agoliblzma: Pass the Filter ID to LZ encoder and decoder.
Lasse Collin [Sun, 27 Nov 2022 16:20:33 +0000 (18:20 +0200)] 
liblzma: Pass the Filter ID to LZ encoder and decoder.

This allows using two Filter IDs with the same
initialization function and data structures.

2 years agoliblzma: Remove two FIXME comments.
Lasse Collin [Sat, 26 Nov 2022 23:03:16 +0000 (01:03 +0200)] 
liblzma: Remove two FIXME comments.

2 years agoxz: Use lzma_filters_free().
Lasse Collin [Sat, 26 Nov 2022 20:25:30 +0000 (22:25 +0200)] 
xz: Use lzma_filters_free().

2 years agoliblzma: Use lzma_filters_free() in more places.
Lasse Collin [Sat, 26 Nov 2022 20:21:13 +0000 (22:21 +0200)] 
liblzma: Use lzma_filters_free() in more places.

2 years agoliblzma: Omit simple coder init functions if they are disabled.
Lasse Collin [Fri, 25 Nov 2022 16:04:37 +0000 (18:04 +0200)] 
liblzma: Omit simple coder init functions if they are disabled.

2 years agoxz: Allow nice_len 2 and 3 even if match finder requires 3 or 4.
Lasse Collin [Thu, 24 Nov 2022 21:24:59 +0000 (23:24 +0200)] 
xz: Allow nice_len 2 and 3 even if match finder requires 3 or 4.

Now that liblzma accepts these, we avoid the extra check and
there's one message less for translators too.

2 years agoliblzma: Allow nice_len 2 and 3 even if match finder requires 3 or 4.
Lasse Collin [Thu, 24 Nov 2022 21:23:55 +0000 (23:23 +0200)] 
liblzma: Allow nice_len 2 and 3 even if match finder requires 3 or 4.

That is, if the specified nice_len is smaller than the minimum
of the match finder, silently use the match finder's minimum value
instead of reporting an error. The old behavior is annoying to users
and it complicates xz options handling too.

2 years agoliblzma: Add lzma_filters_update() support to the multi-threaded encoder.
Lasse Collin [Thu, 24 Nov 2022 14:25:10 +0000 (16:25 +0200)] 
liblzma: Add lzma_filters_update() support to the multi-threaded encoder.

A tiny downside of this is that now a 1-4 tiny allocations are made
for every Block because each worker thread needs its own copy of
the filter chain.

2 years agoUpdate THANKS.
Lasse Collin [Thu, 24 Nov 2022 12:53:22 +0000 (14:53 +0200)] 
Update THANKS.

2 years agoBuild: Don't put GNU/Linux-specific symbol versions into static liblzma.
Lasse Collin [Thu, 24 Nov 2022 12:52:44 +0000 (14:52 +0200)] 
Build: Don't put GNU/Linux-specific symbol versions into static liblzma.

It not only makes no sense to put symbol versions into a static library
but it can also cause breakage.

By default Libtool #defines PIC if building a shared library and
doesn't define it for static libraries. This is documented in the
Libtool manual. It can be overriden using --with-pic or --without-pic.
configure.ac detects if --with-pic or --without-pic is used and then
gives an error if neither --disable-shared nor --disable-static was
used at the same time. Thus, in normal situations it works to build
both shared and static library at the same time on GNU/Linux,
only --with-pic or --without-pic requires that only one type of
library is built.

Thanks to John Paul Adrian Glaubitz from Debian for reporting
the problem that occurred on ia64:
https://www.mail-archive.com/xz-devel@tukaani.org/msg00610.html

2 years agoliblzma: Refactor to use lzma_filters_free().
Lasse Collin [Wed, 23 Nov 2022 23:32:16 +0000 (01:32 +0200)] 
liblzma: Refactor to use lzma_filters_free().

lzma_filters_free() sets the options to NULL and ids to
LZMA_VLI_UNKNOWN so there is no need to do it by caller;
the filter arrays will always be left in a safe state.

Also use memcpy() instead of a loop to copy a filter chain
when it is known to be safe to copy LZMA_FILTERS_MAX + 1
(even if the elements past the terminator might be uninitialized).

2 years agoliblzma: Fix another invalid free() after memory allocation failure.
Lasse Collin [Wed, 23 Nov 2022 23:26:37 +0000 (01:26 +0200)] 
liblzma: Fix another invalid free() after memory allocation failure.

This time it can happen when lzma_stream_encoder_mt() is used
to reinitialize an existing multi-threaded Stream encoder
and one of 1-4 tiny allocations in lzma_filters_copy() fail.

It's very similar to the previous bug
10430fbf3820dafd4eafd38ec8be161a6978ed2b, happening with
an array of lzma_filter structures whose old options are freed
but the replacement never arrives due to a memory allocation
failure in lzma_filters_copy().

2 years agoliblzma: Add support for LZMA_SYNC_FLUSH in the Block encoder.
Jia Tan [Thu, 5 May 2022 12:53:42 +0000 (20:53 +0800)] 
liblzma: Add support for LZMA_SYNC_FLUSH in the Block encoder.

The documentation mentions that lzma_block_encoder() supports
LZMA_SYNC_FLUSH but it was never added to supported_actions[]
in the internal structure. Because of this, LZMA_SYNC_FLUSH could
not be used with the Block encoder unless it was the next coder
after something like stream_encoder() or stream_encoder_mt().

2 years agoliblzma: Add new API function lzma_filters_free().
Lasse Collin [Wed, 23 Nov 2022 23:02:50 +0000 (01:02 +0200)] 
liblzma: Add new API function lzma_filters_free().

This is small but convenient and should have been added
a long time ago.

2 years agoCMake: Don't use symbol versioning with static library.
Lasse Collin [Wed, 23 Nov 2022 22:02:31 +0000 (00:02 +0200)] 
CMake: Don't use symbol versioning with static library.

2 years agoliblzma: Add lzma_attr_warn_unused_result to lzma_filters_copy().
Lasse Collin [Wed, 23 Nov 2022 19:55:22 +0000 (21:55 +0200)] 
liblzma: Add lzma_attr_warn_unused_result to lzma_filters_copy().

2 years agoliblzma: Fix invalid free() after memory allocation failure.
Lasse Collin [Wed, 23 Nov 2022 19:26:21 +0000 (21:26 +0200)] 
liblzma: Fix invalid free() after memory allocation failure.

The bug was in the single-threaded .xz Stream encoder
in the code that is used for both re-initialization and for
lzma_filters_update(). To trigger it, an application had
to either re-initialize an existing encoder instance with
lzma_stream_encoder() or use lzma_filters_update(), and
then one of the 1-4 tiny allocations in lzma_filters_copy()
(called from stream_encoder_update()) must fail. An error
was correctly reported but the encoder state was corrupted.

This is related to the recent fix in
f8ee61e74eb40600445fdb601c374d582e1e9c8a which is good but
it wasn't enough to fix the main problem in stream_encoder.c.

2 years agoliblzma: Fix language in a comment.
Lasse Collin [Tue, 22 Nov 2022 14:37:15 +0000 (16:37 +0200)] 
liblzma: Fix language in a comment.

2 years agoliblzma: Fix infinite loop in LZMA encoder init with dict_size >= 2 GiB.
Lasse Collin [Tue, 22 Nov 2022 09:20:17 +0000 (11:20 +0200)] 
liblzma: Fix infinite loop in LZMA encoder init with dict_size >= 2 GiB.

The encoder doesn't support dictionary sizes larger than 1536 MiB.
This is validated, for example, when calculating the memory usage
via lzma_raw_encoder_memusage(). It is also enforced by the LZ
part of the encoder initialization. However, LZMA encoder with
LZMA_MODE_NORMAL did an unsafe calculation with dict_size before
such validation and that results in an infinite loop if dict_size
was 2 << 30 or greater.

2 years agoliblzma: Fix two Doxygen commands in the API headers.
Lasse Collin [Mon, 21 Nov 2022 11:02:33 +0000 (13:02 +0200)] 
liblzma: Fix two Doxygen commands in the API headers.

These were caught by clang -Wdocumentation.

2 years agoxz: Refactor duplicate code from hardware_memlimit_mtenc_get().
Lasse Collin [Sat, 19 Nov 2022 17:09:55 +0000 (19:09 +0200)] 
xz: Refactor duplicate code from hardware_memlimit_mtenc_get().

2 years agoxz: Add support --threads=+N so that -T+1 gives threaded mode.
Lasse Collin [Sat, 19 Nov 2022 17:06:13 +0000 (19:06 +0200)] 
xz: Add support --threads=+N so that -T+1 gives threaded mode.

2 years agoCMake: Adds test_memlimit to CMake tests
Jia Tan [Sat, 19 Nov 2022 15:18:04 +0000 (23:18 +0800)] 
CMake: Adds test_memlimit to CMake tests

2 years agoTranslations: Update the Korean translation.
Lasse Collin [Tue, 15 Nov 2022 17:10:21 +0000 (19:10 +0200)] 
Translations: Update the Korean translation.

2 years agoTranslations: Update the Turkish translation.
Lasse Collin [Tue, 15 Nov 2022 17:09:28 +0000 (19:09 +0200)] 
Translations: Update the Turkish translation.

2 years agoBump version number for 5.3.4alpha. v5.3.4alpha
Lasse Collin [Tue, 15 Nov 2022 08:58:39 +0000 (10:58 +0200)] 
Bump version number for 5.3.4alpha.

2 years agoAdd NEWS for 5.3.4alpha.
Lasse Collin [Tue, 15 Nov 2022 08:54:40 +0000 (10:54 +0200)] 
Add NEWS for 5.3.4alpha.

2 years agoAdd NEWS for 5.2.8.
Lasse Collin [Tue, 15 Nov 2022 08:54:08 +0000 (10:54 +0200)] 
Add NEWS for 5.2.8.

2 years agoRevert "liblzma: Simple/BCJ filters: Allow disabling generic BCJ options."
Lasse Collin [Mon, 14 Nov 2022 21:19:57 +0000 (23:19 +0200)] 
Revert "liblzma: Simple/BCJ filters: Allow disabling generic BCJ options."

This reverts commit 177bdc922cb17bd0fd831ab8139dfae912a5c2b8
and also does equivalent change to arm64.c.

Now that ARM64 filter will use lzma_options_bcj, this change
is not needed anymore.

2 years agoReplace the experimental ARM64 filter with a new experimental version.
Lasse Collin [Mon, 14 Nov 2022 21:14:41 +0000 (23:14 +0200)] 
Replace the experimental ARM64 filter with a new experimental version.

This is incompatible with the previous version.

This has space/tab fixes in filter_*.c and bcj.h too.

2 years agoliblzma: Add fast CRC64 for 32/64-bit x86 using SSSE3 + SSE4.1 + CLMUL.
Lasse Collin [Mon, 14 Nov 2022 19:34:57 +0000 (21:34 +0200)] 
liblzma: Add fast CRC64 for 32/64-bit x86 using SSSE3 + SSE4.1 + CLMUL.

It also works on E2K as it supports these intrinsics.

On x86-64 runtime detection is used so the code keeps working on
older processors too. A CLMUL-only build can be done by using
-msse4.1 -mpclmul in CFLAGS and this will reduce the library
size since the generic implementation and its 8 KiB lookup table
will be omitted.

On 32-bit x86 this isn't used by default for now because by default
on 32-bit x86 the separate assembly file crc64_x86.S is used.
If --disable-assembler is used then this new CLMUL code is used
the same way as on 64-bit x86. However, a CLMUL-only build
(-msse4.1 -mpclmul) won't omit the 8 KiB lookup table on
32-bit x86 due to a currently-missing check for disabled
assembler usage.

The configure.ac check should be such that the code won't be
built if something in the toolchain doesn't support it but
--disable-clmul-crc option can be used to unconditionally
disable this feature.

CLMUL speeds up decompression of files that have compressed very
well (assuming CRC64 is used as a check type). It is know that
the CLMUL code is significantly slower than the generic code for
tiny inputs (especially 1-8 bytes but up to 16 bytes). If that
is a real-world problem then there is already a commented-out
variant that uses the generic version for small inputs.

Thanks to Ilya Kurdyukov for the original patch which was
derived from a white paper from Intel [1] (published in 2009)
and public domain code from [2] (released in 2016).

[1] https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-crc-computation-generic-polynomials-pclmulqdq-paper.pdf
[2] https://github.com/rawrunprotected/crc

2 years agoTranslations: Update the Swedish translation one more time.
Lasse Collin [Mon, 14 Nov 2022 18:14:34 +0000 (20:14 +0200)] 
Translations: Update the Swedish translation one more time.

2 years agoTranslations: Update the Swedish translation again.
Lasse Collin [Mon, 14 Nov 2022 17:34:15 +0000 (19:34 +0200)] 
Translations: Update the Swedish translation again.

2 years agoTranslations: Update the Swedish translation.
Lasse Collin [Mon, 14 Nov 2022 17:07:45 +0000 (19:07 +0200)] 
Translations: Update the Swedish translation.

2 years agoTranslations: Update the Ukrainian translation.
Lasse Collin [Mon, 14 Nov 2022 16:58:09 +0000 (18:58 +0200)] 
Translations: Update the Ukrainian translation.

2 years agoBuild: Omit x86_64 from --enable-assembler.
Lasse Collin [Mon, 14 Nov 2022 15:58:07 +0000 (17:58 +0200)] 
Build: Omit x86_64 from --enable-assembler.

It didn't do anything. There are only 32-bit x86 assembly files
and it feels likely that new files won't be added as intrinsics
in C are more portable across toolchains and OSes.

2 years agoliblzma: Use __attribute__((__constructor__)) if available.
Lasse Collin [Mon, 14 Nov 2022 14:00:52 +0000 (16:00 +0200)] 
liblzma: Use __attribute__((__constructor__)) if available.

This uses it for CRC table initializations when using --disable-small.
It avoids mythread_once() overhead. It also means that then
--disable-small --disable-threads is thread-safe if this attribute
is supported.

2 years agoTranslations: Update the Romanian translation.
Lasse Collin [Sat, 12 Nov 2022 19:19:52 +0000 (21:19 +0200)] 
Translations: Update the Romanian translation.

2 years agoTranslations: Update the Hungarian translation.
Lasse Collin [Sat, 12 Nov 2022 19:17:45 +0000 (21:17 +0200)] 
Translations: Update the Hungarian translation.

2 years agoTranslations: Update the Finnish translation.
Lasse Collin [Fri, 11 Nov 2022 15:58:57 +0000 (17:58 +0200)] 
Translations: Update the Finnish translation.

2 years agoTranslations: Update the Croatian translation.
Lasse Collin [Fri, 11 Nov 2022 15:58:18 +0000 (17:58 +0200)] 
Translations: Update the Croatian translation.

2 years agoTranslations: Update the Polish translation.
Lasse Collin [Fri, 11 Nov 2022 15:57:18 +0000 (17:57 +0200)] 
Translations: Update the Polish translation.

2 years agoTranslations: Update the Spanish translation.
Lasse Collin [Fri, 11 Nov 2022 15:56:44 +0000 (17:56 +0200)] 
Translations: Update the Spanish translation.

2 years agoUpdate THANKS.
Lasse Collin [Fri, 11 Nov 2022 15:16:03 +0000 (17:16 +0200)] 
Update THANKS.

2 years agoliblzma: Fix building with Intel ICC (the classic compiler).
Lasse Collin [Fri, 11 Nov 2022 15:15:25 +0000 (17:15 +0200)] 
liblzma: Fix building with Intel ICC (the classic compiler).

It claims __GNUC__ >= 10 but doesn't support __symver__ attribute.

Thanks to Stephen Sachs.

2 years agoliblzma: Fix incorrect #ifdef for x86 SSE2 support.
Lasse Collin [Fri, 11 Nov 2022 12:35:58 +0000 (14:35 +0200)] 
liblzma: Fix incorrect #ifdef for x86 SSE2 support.

__SSE2__ is the correct macro for SSE2 support with GCC, Clang,
and ICC. __SSE2_MATH__ means doing floating point math with SSE2
instead of 387. Often the latter macro is defined if the first
one is but it was still a bug.

2 years agoAdd NEWS for 5.2.7 (forgotten cherry-pick from v5.2).
Lasse Collin [Fri, 11 Nov 2022 11:27:06 +0000 (13:27 +0200)] 
Add NEWS for 5.2.7 (forgotten cherry-pick from v5.2).

2 years agoxzdiff: Add support for .lz files.
Lasse Collin [Fri, 11 Nov 2022 11:16:21 +0000 (13:16 +0200)] 
xzdiff: Add support for .lz files.

The other scripts don't need changes for .lz support because
in those scripts it is enough that xz supports .lz.

2 years agoScripts: Ignore warnings from xz.
Lasse Collin [Fri, 11 Nov 2022 10:23:58 +0000 (12:23 +0200)] 
Scripts: Ignore warnings from xz.

In practice this means making the scripts work when
the input files have an unsupported check type which
isn't a problem in practice unless support for
some check types has been disabled at build time.

2 years agoTranslations: Rename poa4/fr_FR.po to po4a/fr.po.
Lasse Collin [Thu, 10 Nov 2022 10:34:43 +0000 (12:34 +0200)] 
Translations: Rename poa4/fr_FR.po to po4a/fr.po.

That's how it is preferred at the Translation Project.
On my system /usr/share/man/fr_FR doesn't contain any
other man pages than XZ Utils while /usr/share/man/fr
has quite a few, so this will fix that too.

Thanks to Benno Schulenberg from the Translation Project.

2 years agoxz: Update the man page about BCJ filters, including upcoming --arm64.
Lasse Collin [Wed, 9 Nov 2022 16:48:50 +0000 (18:48 +0200)] 
xz: Update the man page about BCJ filters, including upcoming --arm64.

The --arm64 isn't actually implemented yet in the form
described in this commit.

Thanks to Jia Tan.

2 years agoxz: Add --arm64 to --long-help and omit endianness from ARM(-Thumb).
Lasse Collin [Wed, 9 Nov 2022 16:14:14 +0000 (18:14 +0200)] 
xz: Add --arm64 to --long-help and omit endianness from ARM(-Thumb).

Modern 32-bit ARM in big endian mode use little endian for
instruction encoding still, so the filters work on such
executables too. It's likely less confusing for users this way.

The --arm64 option hasn't been implemented yet (there is
--experimental-arm64 but it's different). The --arm64 option
is added now anyway because this is the likely result and the
strings need to be ready for translators.

Thanks to Jia Tan.

2 years agoWindows: Update the VS project files for ARM64 and .lz support.
Lasse Collin [Wed, 9 Nov 2022 13:12:13 +0000 (15:12 +0200)] 
Windows: Update the VS project files for ARM64 and .lz support.

2 years agoDOS: Update Makefile and config.h to include ARM64 and .lz support.
Lasse Collin [Wed, 9 Nov 2022 12:57:48 +0000 (14:57 +0200)] 
DOS: Update Makefile and config.h to include ARM64 and .lz support.

2 years agoCMake: Add lzip decoder files and #define to the build.
Lasse Collin [Wed, 9 Nov 2022 12:45:05 +0000 (14:45 +0200)] 
CMake: Add lzip decoder files and #define to the build.

2 years agoDocs: Update INSTALL and also add new prohibited options to PACKAGERS.
Lasse Collin [Wed, 9 Nov 2022 12:41:56 +0000 (14:41 +0200)] 
Docs: Update INSTALL and also add new prohibited options to PACKAGERS.

2 years agoTests: Test the .lz files in test_files.sh.
Lasse Collin [Thu, 20 Oct 2022 14:39:06 +0000 (17:39 +0300)] 
Tests: Test the .lz files in test_files.sh.

2 years agoTests: Add .lz (lzip) test files.
Lasse Collin [Thu, 20 Oct 2022 12:35:59 +0000 (15:35 +0300)] 
Tests: Add .lz (lzip) test files.

2 years agoxz: Remove the commented-out FORMAT_GZIP, gzip, .gz, and .tgz.
Lasse Collin [Wed, 19 Oct 2022 19:32:51 +0000 (22:32 +0300)] 
xz: Remove the commented-out FORMAT_GZIP, gzip, .gz, and .tgz.

2 years agoxz: Add .lz (lzip) decompression support.
Lasse Collin [Sat, 8 Oct 2022 18:28:15 +0000 (21:28 +0300)] 
xz: Add .lz (lzip) decompression support.

If configured with --disable-lzip-decoder then --long-help will
still list `lzip' in --format but I left it like that since
due to translations it would be messy to have two help strings.
Features are disabled only in special situations so wrong help
in such a situation shouldn't matter much.

Thanks to Michał Górny for the original patch.

2 years agoliblzma: Add .lz support to lzma_auto_decoder().
Lasse Collin [Fri, 7 Oct 2022 21:29:20 +0000 (00:29 +0300)] 
liblzma: Add .lz support to lzma_auto_decoder().

Thanks to Michał Górny for the original patch.

2 years agoliblzma: Add .lz (lzip) decompression support (format versions 0 and 1).
Lasse Collin [Thu, 6 Oct 2022 12:50:20 +0000 (15:50 +0300)] 
liblzma: Add .lz (lzip) decompression support (format versions 0 and 1).

Support for format version 0 was removed from lzip 1.18 for some
reason. .lz format version 0 files are rare (and old) but some
source packages were released in this format, and some people might
have personal files in this format too. It's very little extra code
to support it along side format version 1 so this commits adds
support for both.

The Sync Flush marker extentension to the original .lz format
version 1 isn't supported. It would require changes to the
LZMA decoder itself. Such files are very rare anyway.

See the API doc for lzma_lzip_decoder() for more details about
the .lz format support.

Thanks to Michał Górny for the original patch.

2 years agoliblzma: Add the missing Makefile.inc change for --disable-microlzma.
Lasse Collin [Wed, 9 Nov 2022 12:17:23 +0000 (14:17 +0200)] 
liblzma: Add the missing Makefile.inc change for --disable-microlzma.

This was forgotten from commit 59c4d6e1390f6f4176f43ac1dad1f7ac03c449b8.

2 years agoxz: Add comments about stdin and src_st.st_size.
Lasse Collin [Wed, 9 Nov 2022 12:10:52 +0000 (14:10 +0200)] 
xz: Add comments about stdin and src_st.st_size.

"xz -v < regular_file > out.xz" doesn't display the percentage
and estimated remaining time because it doesn't even try to
check the input file size when input is read from stdin.
This could be improved but for now there's just a comment
to remind about it.

2 years agoxz: Fix displaying of file sizes in progress indicator in passthru mode.
Lasse Collin [Wed, 9 Nov 2022 10:48:22 +0000 (12:48 +0200)] 
xz: Fix displaying of file sizes in progress indicator in passthru mode.

It worked for one input file since the counters are zero when
xz starts but they weren't reset when starting a new file in
passthru mode. For example, if files A, B, and C are one byte each,
then "xz -dcvf A B C" would show file sizes as 1, 2, and 3 bytes
instead of 1, 1, and 1 byte.

2 years agoxz: Add a comment why --to-stdout is not in --help.
Lasse Collin [Wed, 9 Nov 2022 09:27:20 +0000 (11:27 +0200)] 
xz: Add a comment why --to-stdout is not in --help.

It is on the man page still.

2 years agoxz: Make xz -lvv show that the upcoming --arm64 needs 5.4.0 to decompress.
Lasse Collin [Tue, 8 Nov 2022 21:05:37 +0000 (23:05 +0200)] 
xz: Make xz -lvv show that the upcoming --arm64 needs 5.4.0 to decompress.

2 years agoDocs: Update faq.txt a little.
Lasse Collin [Tue, 8 Nov 2022 20:26:54 +0000 (22:26 +0200)] 
Docs: Update faq.txt a little.

2 years agoTranslations: Update Turkish translation.
Lasse Collin [Tue, 8 Nov 2022 14:57:17 +0000 (16:57 +0200)] 
Translations: Update Turkish translation.

2 years agoTranslations: Update Croatian translation.
Lasse Collin [Tue, 8 Nov 2022 12:55:32 +0000 (14:55 +0200)] 
Translations: Update Croatian translation.

2 years agoliblzma: Update API docs about decoder flags.
Lasse Collin [Tue, 8 Nov 2022 12:13:03 +0000 (14:13 +0200)] 
liblzma: Update API docs about decoder flags.

2 years agoliblzma: Use the return_if_error() macro in alone_decoder.c.
Lasse Collin [Tue, 8 Nov 2022 12:01:50 +0000 (14:01 +0200)] 
liblzma: Use the return_if_error() macro in alone_decoder.c.

2 years agoliblzma: Fix a comment in auto_decoder.c.
Lasse Collin [Tue, 8 Nov 2022 12:00:58 +0000 (14:00 +0200)] 
liblzma: Fix a comment in auto_decoder.c.

2 years agoxz: Initialize the pledge(2) sandbox at the very beginning of main().
Lasse Collin [Tue, 8 Nov 2022 11:43:19 +0000 (13:43 +0200)] 
xz: Initialize the pledge(2) sandbox at the very beginning of main().

It feels better that the initializations are sandboxed too.
They don't do anything that the pledge() call wouldn't allow.

3 years agoxz: Extend --robot --info-memory output.
Lasse Collin [Mon, 7 Nov 2022 20:51:16 +0000 (22:51 +0200)] 
xz: Extend --robot --info-memory output.

Now it includes everything that the human-readable --info-memory shows.

3 years agoliblzma: Include cached memory in reported memusage in threaded decoder.
Lasse Collin [Mon, 7 Nov 2022 15:22:04 +0000 (17:22 +0200)] 
liblzma: Include cached memory in reported memusage in threaded decoder.

This affects lzma_memusage() and lzma_memlimit_set() when used
with the threaded decompressor. Now all allocations are reported
by lzma_memusage() (so it's not misleading) and lzma_memlimit_set()
cannot lower the limit below that value.

The alternative would have been to allow lowering the limit if
doing so is possible by freeing the cached memory but since
the primary use case of lzma_memlimit_set() is to increase
memlimit after LZMA_MEMLIMIT_ERROR this simple approach
was selected.

The cached memory was always included when enforcing
the memory usage limit while decoding.

Thanks to Jia Tan.

3 years agoxz: Avoid a compiler warning in progress_speed() in message.c.
Jia Tan [Mon, 7 Nov 2022 14:24:14 +0000 (16:24 +0200)] 
xz: Avoid a compiler warning in progress_speed() in message.c.

This should be smaller too since it avoids the string constants.

3 years agoBuild: Clarify comment in configure.ac about SSE2.
Lasse Collin [Mon, 31 Oct 2022 14:26:05 +0000 (16:26 +0200)] 
Build: Clarify comment in configure.ac about SSE2.

3 years agoBuild: Remove obsolete commented-out lines from configure.ac.
Lasse Collin [Mon, 31 Oct 2022 14:16:37 +0000 (16:16 +0200)] 
Build: Remove obsolete commented-out lines from configure.ac.

3 years agoWindows: Fix mythread_once() macro with Vista threads.
Lasse Collin [Mon, 31 Oct 2022 11:31:58 +0000 (13:31 +0200)] 
Windows: Fix mythread_once() macro with Vista threads.

Don't call InitOnceComplete() if initialization was already done.

So far mythread_once() has been needed only when building
with --enable-small. windows/build.bash does this together
with --disable-threads so the Vista-specific mythread_once()
is never needed by those builds. VS project files or
CMake-builds don't support HAVE_SMALL builds at all.

3 years agoliblzma: Silence -Wconversion warning from crc64_fast.c.
Lasse Collin [Mon, 31 Oct 2022 09:54:44 +0000 (11:54 +0200)] 
liblzma: Silence -Wconversion warning from crc64_fast.c.