1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00
Commit graph

2271 commits

Author SHA1 Message Date
Jia Tan
db5019d691 Translations: Update the Vietnamese translation. 2023-07-22 18:37:56 +08:00
Jia Tan
f3a055f762 CI: Add Windows runner for Autotools builds with MSYS2.
Only a subset of the tests run by the Linux and MacOS Autotools builds
are run. The most interesting tests are the ones that disable threads,
encoders, and decoders.

The Windows runner will only be run manually since these tests will
likely take much longer than the Linux and MacOS runners. This runner
should be used before merging any large features and before releases.

Currently the clang64 environment fails to due to a warning and
-Werror is enabled for the CI tests. This is still an early version
since the CMake build can be done for MSVC and optionally each of the
MSYS2 environments. GitHub does not allow manually running the CI tests
unless the workflow is checked on the default branch so checking in a
minimum version is a good idea.

Thanks to Arthur S for the original proposing the original patch.

Closes: https://github.com/tukaani-project/xz/pull/34
2023-07-22 18:31:02 +08:00
Jia Tan
556536a352 CI: Add argument to ci_build.sh to pass flags to autogen.sh. 2023-07-22 18:13:43 +08:00
Jia Tan
39a32d36fc Tests: Skip .lz files in test_files.sh if not configured.
Previously if the lzip decoder was not configured then test_files.sh
would pass the lzip tests instead of skipping them.
2023-07-21 18:05:44 +08:00
Jia Tan
194d12724b Tests: Add ARM64 filter test to test_compress.sh. 2023-07-20 22:11:13 +08:00
Jia Tan
d850365c44 Translations: Update the Croatian translation. 2023-07-20 20:30:05 +08:00
Jia Tan
24049eb7ac Translations: Update the Korean man page translations. 2023-07-20 20:28:32 +08:00
Jia Tan
4d4a4fa07d Translations: Update the Korean translation. 2023-07-20 20:25:24 +08:00
Jia Tan
237f06d9c5 Translations: Update the Polish translation. 2023-07-20 20:24:05 +08:00
Jia Tan
80c2c83213 Translations: Update the German man page translations. 2023-07-20 20:22:23 +08:00
Jia Tan
fdbde14503 Translations: Update the German translation. 2023-07-20 20:18:44 +08:00
Jia Tan
9f3bf5ff5b Translations: Update the Chinese (simplified) translation. 2023-07-20 20:17:10 +08:00
Jia Tan
376938c588 Translations: Update the Swedish translation. 2023-07-20 20:15:47 +08:00
Jia Tan
26b0bc6eb8 Translations: Update the Ukrainian man page translations. 2023-07-20 20:14:00 +08:00
Jia Tan
2d02c8b764 Translations: Update the Ukrainian translation. 2023-07-20 20:09:15 +08:00
Jia Tan
f881018b50 Translations: Update the Spanish translation. 2023-07-20 20:06:57 +08:00
Jia Tan
791fe6d3ff Translations: Update the Romanian translation. 2023-07-20 20:05:19 +08:00
Jia Tan
8827e90704 Translations: Update the Romanian man page translations. 2023-07-20 20:02:56 +08:00
Jia Tan
0184d344fa liblzma: Suppress -Wunused-function warning.
Clang 16.0.0 and earlier have a bug that the ifunc resolver function
triggers the -Wunused-function warning. The resolver function is static
and only "used" by the __attribute__((__ifunc()__)).

At this time, the bug is still unresolved, but has been reported:
https://github.com/llvm/llvm-project/issues/63957

This is not a problem in GCC.
2023-07-19 23:36:00 +08:00
Jia Tan
43845fa70f liblzma: Reword lzma_str_list_filters() documentation.
This further improves the documentation from commit
f36ca7982f. The previous wording of
"supported options" was slightly misleading since the options that are
printed are the ones that are relevant for encoding/decoding. It is not
about which options can or must be specified.
2023-07-18 22:57:58 +08:00
Jia Tan
818701ba1c liblzma: Improve comment in string_conversion.c.
The comment used "flag" when referring to decoder options. Just
referring to them as options is more clear and consistent.
2023-07-18 22:56:47 +08:00
Lasse Collin
b6b7d06585 xz: Translate the second "%s: " in message.c since French needs "%s : ".
This string is used to print a filename when using "xz -v" and
stderr isn't a terminal.
2023-07-18 17:37:33 +03:00
Lasse Collin
be644042c3 xz: Make "%s: %s" translatable because French needs "%s : %s". 2023-07-18 17:34:18 +03:00
Lasse Collin
97fd5cb669 liblzma: Tweak #if condition in memcmplen.h.
Maybe ICC always #defines _MSC_VER on Windows but now
it's very clear which code will get used.
2023-07-18 13:57:54 +03:00
Lasse Collin
40392c19f7 liblzma: Omit unnecessary parenthesis in a preprocessor directive. 2023-07-18 13:49:43 +03:00
Jia Tan
abc1d5601b xz: Update Authors list in a few files. 2023-07-18 00:51:48 +08:00
Jia Tan
289034a168 Docs: Add a new section to INSTALL for Tests.
The new Tests section describes basic information about the tests, how
to run them, and important details when cross compiling. We have had a
few questions about how to compile the tests without running them, so
hopefully this information will help others with the same question in the
future.

Fixes: https://github.com/tukaani-project/xz/issues/54
2023-07-18 00:45:31 +08:00
Jia Tan
1119e5f5a5 Docs: Update README.
This adds an entry to "Other implementations of the .xz format" for
XZ for Java.
2023-07-17 23:53:30 +08:00
Jia Tan
f99e2e4e53 xz: Fix typo in man page.
The Memory limit information section described three output
columns when it actually has six. This was reworded to
"multiple" to make it more future proof.
2023-07-17 23:34:55 +08:00
Jia Tan
f907705eb1 xz: Minor clean up for coder.c
* Moved max_block_list_size from a global to local variable.
* Reworded error message in validate_block_list_filter().
* Removed helper function filter_chain_error().
* Changed 1 << X to 1U << X in many places
2023-07-17 23:34:55 +08:00
Jia Tan
9adc9e5615 xz: Update man page Authors and date. 2023-07-17 23:34:55 +08:00
Jia Tan
c12e429f26 xz: Add a section to man page for robot mode --filters-help. 2023-07-17 23:34:55 +08:00
Jia Tan
e10f2db5d1 xz: Slight reword in xz man page for consistency.
Changed will print => prints in xz --robot --version description to
match --robot --info-memory description.
2023-07-17 23:34:55 +08:00
Jia Tan
f5dc172a40 xz: Reorder robot mode subsections in the man page.
The order is now consistent with the order the command line arguments
are documented earlier in the man page. The new order is:
1. --list
2. --info-memory
3. --version

Instead of the previous order:
1. --version
2. --info-memory
3. --list
2023-07-17 23:34:55 +08:00
Jia Tan
9628be23ae xz: Update man page for new --filters-help option. 2023-07-17 23:34:55 +08:00
Jia Tan
a165d7df19 xz: Add a new --filters-help option.
The --filters-help can be used to help create filter chains with the
--filters and --filtersX options. The message in --long-help is too
short to fully explain the syntax to construct complex filter chains.

In --robot mode, xz will only print the output from liblzma function
lzma_str_list_filters.
2023-07-17 23:34:55 +08:00
Jia Tan
95f1a414b1 xz: Update the man page for --block-list and --filtersX
The --block-list option description needed updating since the new
--filtersX option changes how it can be used. The new entry for
--filters1=FILTERS ... --filter9=FILTERS was created right after
the --filters option.
2023-07-17 23:34:55 +08:00
Jia Tan
47a63cad2a xz: Update --long-help for the new --filtersX option. 2023-07-17 23:34:55 +08:00
Jia Tan
8b9913a13d xz: Ignore filter chains that are set but never used in --block-list.
If a filter chain is set but not used in --block-list, it introduced
unexpected behavior such as requiring an unneeded amount of memory to
compress, reducing the number of threads in multi-threaded encoding, and
printing an incorrect amount of memory needed to decompress.

This also renames filters_init_mask => filters_used_mask. A filter is
assumed to be used if it is specified in --filtersX until
coder_set_compression_settings() determines which filters are referenced
in --block-list.
2023-07-17 23:34:55 +08:00
Jia Tan
183819bfd9 xz: Set the Block size for mt encoding correctly.
When opt_block_size is not used, the Block size for mt encoder is
derived from the minimum of the largest Block specified by
--block-list and the recommended Block size on all filter chains
calculated by lzma_mt_block_size(). This avoids using unnecessary
memory and ensures that all Blocks are large enough for the most memory
needy filter chain.
2023-07-17 23:34:55 +08:00
Jia Tan
afb2dbec3d xz: Validate --flush-timeout for all specified filter chains. 2023-07-17 23:34:55 +08:00
Jia Tan
5f0c5a0438 xz: Allows --block-list filters to scale down memory usage.
Previously, only the default filter chain could have its memory usage
adjusted. The filter chains specified with --filtersX were not checked
for memory usage. Now, all used filter chains will be adjusted if
necessary.
2023-07-17 23:34:55 +08:00
Jia Tan
479fd58d60 xz: Do not include block splitting if encoders are disabled.
The block splitting logic and split_block() function are not needed if
encoders are disabled. This will help slightly reduce the binary size
when built without encoders and allow split_block() to use functions
that require encoders being enabled.
2023-07-17 23:34:55 +08:00
Jia Tan
f86ede2250 xz: Free filters[] in debug mode.
This will only free filter chains created with --filters1-9 since the
default filter chain may be set from a static function variable. The
complexity to free the default filter chain is not worth the burden on
code maintenance.
2023-07-17 23:34:55 +08:00
Jia Tan
f281cd0d69 xz: Add a message if --block-list is used outside of xz compresssion.
--block-list is only supported with compression in xz format. This avoids
silently ignoring when --block-list is unused.
2023-07-17 23:34:55 +08:00
Jia Tan
d6af7f3470 xz: Create command line options for filters[1-9].
The new command line options are meant to be combined with --block-list.
They work as an optional extension to --block-list to specify a custom
filter chain for each block listed. The new options allow the creation
of up to 9 reusable filter chains. For instance:

xz --block-list=1:10MiB,3:5MiB,,2:5MiB,1:0 --filters1=delta--lzma2 \
--filters2=x86--lzma2 --filters3=arm64--lzma2

Will create the following blocks:
1. A block of size 10 MiB with filter chain delta, lzma2.
2. A block of size 5 MiB with filter chain arm64, lzma2.
3. A block of size 5 MiB with filter chain arm64, lzma2.
4. A block of size 5 MiB with filter chain x86, lzma2.
5. A block containing the rest of the file contents with filter chain
   delta, lzma2.
2023-07-17 23:34:55 +08:00
Jia Tan
072d292501 xz: Use lzma_filters_free() in forget_filter_chain().
This is a little cleaner than the previous implementation of
forget_filter_chain(). It is also more consistent since
lzma_str_to_filters() will always terminate the filter chain so there
is no need to terminate it later in coder_set_compression_settings().
2023-07-17 23:34:55 +08:00
Jia Tan
3d21da5cff xz: Separate string to filter conversion into a helper function.
Converting from string to filter will also need to be done for block
specific filter chains.
2023-07-17 23:34:55 +08:00
Jia Tan
a6583726e5 Tests: Use new --filters option in test_compress.sh 2023-07-17 23:34:55 +08:00
Jia Tan
5f3b898d07 xz: Update --long-help and man page for new --filters option. 2023-07-17 23:34:55 +08:00