1
0
mirror of https://git.tukaani.org/xz.git synced 2025-02-17 14:08:12 +00:00

2488 Commits

Author SHA1 Message Date
Lasse Collin
1aa92c7ffd Add SPDX license identifier to .codespellrc
(cherry picked from commit 9000d70eb9815bd7f43ffddc1c3316c507aa0e05)
2024-05-23 11:37:06 +03:00
Lasse Collin
3c7e400fdc Move entries po4a/.gitignore to the top level .gitignore
The po4a directory is in EXTRA_DIST and thus all files there
are included in the package. .gitignore doesn't belong in the
package so keep that file out of the po4a directory.

(cherry picked from commit 903c16fcfa5bfad0cdb2a7383d941243bcb12e76)
2024-05-23 11:37:06 +03:00
Lasse Collin
8a99272d4a CMake: Add comments
(cherry picked from commit 9d997d6f9d4f042412e45c7b7a23a14ad2e4f9aa)
2024-05-23 11:36:05 +03:00
Lasse Collin
c35259c9e2 CMake: Remove the note that some tests aren't run
They are now in the common build configurations.

(cherry picked from commit d35368b33e54bad2f566df99fac29ffea38e34de)
2024-05-23 11:36:05 +03:00
Lasse Collin
30982a2153 CMake: Add support for test_files.sh
(cherry picked from commit dc232d584619b2819a9c52d6ad5d8b5d56b392ba)
2024-05-23 11:36:05 +03:00
Lasse Collin
3a8f81e0ad Tests: Make test_files.sh more flexible
Add a new optional argument to specify the directory of the xz and
xzdec executables.

If ../config.h doesn't exist, assume that all encoders and decoders
are available.

(cherry picked from commit a7e9230af9d1f87f474fe38886eb977d4149dc9b)
2024-05-23 11:36:05 +03:00
Lasse Collin
0644675c82 CMake: Add support for test_compress.sh tests
(cherry picked from commit b40e6efbb48d740b9b5b303e59e344801cbb5bd8)
2024-05-23 11:36:05 +03:00
Lasse Collin
dcc02a6ca0 Tests: Make test_compress.sh more flexible
Add a new optional second argument: directory of the xz and xzdec
executables. This is need with the CMake build where the binaries
end up in the top-level build directory.

If ../config.h doesn't exist, assume that all encoders and decoders
are available. This will make this script usable from CMake in the
most common build configuration.

NOTE: Since the existence of ../config.h is checked, the working
directory of the test script must be a subdir in the build tree!
Otherwise ../config.h would look outside the build tree.

Use the default check type instead of forcing CRC32 or CRC64.
Now the script doesn't need to check if CRC64 is available.

(cherry picked from commit ac3222d2cb1ff3a15eb6d58f9ea9bc78e8bc3bb2)
2024-05-23 11:36:05 +03:00
Lasse Collin
c761b7051f CMake: Prepare to support the test_*.sh tests
This is a bit hacky since the scripts grep config.h to know which
features were built but the CMake build doesn't create config.h.
So instead those test scripts will be run only when all relevant
features have been enabled.

(cherry picked from commit 006040b29c83104403621e950ada0c8956c56b3d)
2024-05-23 11:36:05 +03:00
Lasse Collin
a71bc2d75b Tests: test_suffix.sh: Add a comment
(cherry picked from commit 6167607a6ea72fb74eefb943c4566e3cab528cd2)
2024-05-23 11:36:05 +03:00
Lasse Collin
8fda5ce872 Fix typos
Thanks to xx on #tukaani.

(cherry picked from commit 4e9023857d287f624562156b60dc23d2b64c0f10)
2024-05-23 11:36:05 +03:00
Lasse Collin
2729079bcb liblzma: Fix white space
Thanks to xx on #tukaani.

(cherry picked from commit b14d08fbbc254485ace9ccfe7908674f608a62ae)
2024-05-23 11:36:05 +03:00
Lasse Collin
a289c4dfeb xz: Document the static function get_chains_memusage()
(cherry picked from commit 142e670a413a7bce1a2647f1cf1f33f8ee2dbe88)
2024-05-23 11:28:20 +03:00
Lasse Collin
6f0db31713 xz: Rename filters_memusage_max() to get_chains_memusage()
(cherry picked from commit 78e984399a64bfee5d11e7308e0bdbc1006db2ca)
2024-05-23 11:28:20 +03:00
Lasse Collin
d7e2bf7e2d xz: Rename filter_memusages to chains_memusages
(cherry picked from commit 54c3db0a83d3e67d89aba92a0957f2dce9b111a7)
2024-05-23 11:28:20 +03:00
Lasse Collin
58f200b6d1 xz: Simplify the memory usage scaling code
This is closer to what it was before the --filtersX support was added,
just extended to support for scaling all filter chains. The method
before this commit was an extended version of the original too but
it was done in a more complex way for no clear reason. In case of
an error, the complex version printed fewer informative messages
(a good thing) but it's not a sigificant benefit.

In the limit is too low even for single-threaded mode, the required
amount of memory is now reported like in 5.4.x instead of like in
5.5.1alpha - 5.6.1 which showed the original non-scaled usage. It
had been a FIXME in the old code but it's not clear what message
makes the most sense.

Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a
(cherry picked from commit d9e1ae79ec90d6a7eafeaceaf0ece4f0c83d4417)
2024-05-23 11:28:20 +03:00
Lasse Collin
41bdc9fa5c xz: Edit comments
(cherry picked from commit 0ee56983d198b776878432703de664049b1be32e)
2024-05-23 11:28:20 +03:00
Lasse Collin
52e40c1912 xz: Rename chain_idx to chain_num
(cherry picked from commit ec82a49c3553f7206104582dbfb8b64fa433b491)
2024-05-23 11:28:20 +03:00
Lasse Collin
8a01963331 xz: Edit coding style
(cherry picked from commit a731a6993c34bbbd55abaf9c166718682b1da24f)
2024-05-23 11:28:20 +03:00
Lasse Collin
e3ad7eda74 xz: Edit comments
Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a
(cherry picked from commit 32eb176b89243fce3112347fe43a8ad14a9fd2be)
2024-05-23 11:28:20 +03:00
Lasse Collin
09cabae2ab xz: Fix grammar in a comment
Fixes: cb3111e3ed84152912b5138d690c8d9f00c6ef02
(cherry picked from commit b90339f4daa510d2b1b8c550f855a99667f1d004)
2024-05-23 11:28:20 +03:00
Lasse Collin
c10b66fbf9 xz: Rename filter_memusages to encoder_memusages
(cherry picked from commit 4c0bdaf13d651b22ba13bd93f8379724d6ccdc13)
2024-05-23 11:28:20 +03:00
Lasse Collin
9132ce3564 xz: Edit coding style
(cherry picked from commit b54aa023e0ec291b06e976e5f094ab0549e7b09b)
2024-05-23 11:28:20 +03:00
Lasse Collin
d642e13874 xz: Rename filters_index to chain_num
The reason is the same as in bd0782c1f13e52cd0fd8415208e30e47004a4c68.

(cherry picked from commit 49f67d3d3f42b640a7dfc4ca04c8934f658e10ce)
2024-05-23 11:28:20 +03:00
Lasse Collin
47599f3b73 xz: Replace a few uint32_t with "unsigned" to reduce the number of casts
These hold only tiny values.

(cherry picked from commit ff9e8b3d069ecfa52ec43dcdb198542d1692a492)
2024-05-23 11:28:20 +03:00
Lasse Collin
8f5ab75c45 xz: Rename filters_used_mask to chains_used_mask
The reason is the same as in bd0782c1f13e52cd0fd8415208e30e47004a4c68.

(cherry picked from commit b5e6c1113b1ba02c282bd9163eccdb521c937a78)
2024-05-23 11:28:20 +03:00
Lasse Collin
3eb7cf9dd5 xz: Move the setting of "check" in coder_set_compression_settings()
It's more logical to do it in the beginning instead of in the middle
of the filter chain handling.

Fixes: d6af7f347077b22403133239592e478931307759
(cherry picked from commit 32500dfaadae2ea36fda2e17b49ae7d9ac1acf52)
2024-05-23 11:28:20 +03:00
Lasse Collin
067961ee0e xz: Rename "filters" to "chains"
The convention is that

    lzma_filter filters[LZMA_FILTERS_MAX + 1];

contains the filters of a single filter chain.
It was so here as well before the commit
d6af7f347077b22403133239592e478931307759.
It changes "filters" to a ten-element array of filter chains.
It's clearer to call this array-of-arrays "chains".

This also renames "filter_idx" to "chain_idx" which is used
as an index as in chains[chain_idx].

(cherry picked from commit ad146b1f42bbb678175a503a45ce525e779f9b8b)
2024-05-23 11:28:20 +03:00
Lasse Collin
6822f6f891 xz: Clean up a comment
(cherry picked from commit 5a4ae4e4d0105404184e9a82ee08f94e1b7783e0)
2024-05-23 11:28:20 +03:00
Lasse Collin
0e5e3e7bdc xz: Add clarifying assertions
(cherry picked from commit 2de80494ed9a4dc7db395a32a5efb770ce769804)
2024-05-23 11:28:20 +03:00
Lasse Collin
77bcf6b76a xz: Add a clarifying assertion
Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a
(cherry picked from commit 1eaad004bf7748976324672db028e34f42802e61)
2024-05-23 11:28:20 +03:00
Lasse Collin
df3efc058a xz: Clarify a comment
(cherry picked from commit 605094329b986244833c967c04963cacc41a868d)
2024-05-23 11:28:20 +03:00
Lasse Collin
4ebfe11cd3 xz: Use the info collected in parse_block_list()
This is slightly simpler and it avoids looping through
the opt_block_list array.

(cherry picked from commit 8fac2577f2dbb9491afd8500f60d004c9071df3b)
2024-05-23 11:28:20 +03:00
Lasse Collin
bfea691361 xz: Remember the filter chains and the largest Block in parse_block_list()
(cherry picked from commit 81d350dab864b985b740742772f3b132d4c52914)
2024-05-23 11:28:20 +03:00
Lasse Collin
d4e33e7392 xz: Update a comment and initialization of filters_used_mask
(cherry picked from commit 46ab56968f7dfdac187710a1223659d832fa1565)
2024-05-23 11:28:20 +03:00
Lasse Collin
3c130737c9 xz: parse_block_list: Edit integer type casting
(cherry picked from commit e89293a0baeb8663707c6b4a74fbb310ec698a8f)
2024-05-23 11:28:20 +03:00
Lasse Collin
40c8513b4e xz: Make filter_memusages a local variable
(cherry picked from commit 87011e40c168255cd2edea129ee68c901770603b)
2024-05-23 11:28:20 +03:00
Lasse Collin
cacaf25aa7 xz: Remove unused code and simplify
opt_mode == MODE_COMPRESS isn't possible when HAVE_ENCODERS isn't
defined. Thus, when *encoding*, the message about *decoder* memory
usage is possible to show only when both encoder and decoder have
been built.

Since the message is shown only at V_DEBUG, skip the memusage
calculation if verbosity level isn't high enough.

Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a
(cherry picked from commit 347b412a9374e0456bef9da0d7d79174c0b6f1a5)
2024-05-23 11:28:20 +03:00
Lasse Collin
3495a6b291 xz: Fix integer type from uint64_t to uint32_t
lzma_options_lzma.dict_size is uint32_t so use it here too.

Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a
(cherry picked from commit 31358c057c9de9d6aba96bae112b2d17942de7cb)
2024-05-23 11:28:20 +03:00
Lasse Collin
2861d856de debug/translation.bash: Remove an outdated test command
Since 5.3.5beta, "xz --lzma2=mf=bt4,nice=2" works even though bt4 needs
at least nice=4. It is rounded up internally by liblzma when needed.

Fixes: 5cd9f0df78cc4f8a7807bf6104adea13034fbb45
(cherry picked from commit 3f71e0f3a118e1012526f94fd640a626d30cb599)
2024-05-23 11:28:20 +03:00
Lasse Collin
54546babc3 Fix the date of NEWS for 5.4.5
(cherry picked from commit b05a516830095a0e1937aeb31c937fb0400408b6)
2024-05-23 11:28:20 +03:00
Lasse Collin
a7e58d1fdb Build: Update visibility.m4 from Gnulib
This fixes the syntax of the "serial" line and renames
a temporary variable.

(cherry picked from commit 6d336aeb97b69c496ddc626af403f6f21c753658)
2024-05-23 11:28:20 +03:00
Lasse Collin
07a9cda037 po4a/update-po: Delete the *.po.authors files
These are temporary files that are needed only when running po4a.
The top-level Makefile.am puts the whole po4a directory into
distribution tarball (it's simpler) so deleting these temporary
files is needed to prevent them from getting into tarballs.

(cherry picked from commit ab51e8ee610e2a893906859848f93d5cb0d5ba83)
2024-05-23 11:28:20 +03:00
Lasse Collin
1b4e7dca24 xz: Edit comments and coding style
(cherry picked from commit e4780244a17420cc95d5498cd6e02ad10eac6e5f)
2024-05-23 11:28:20 +03:00
Lasse Collin
18683525a7 xz: Omit an incorrect comment
It likely was a leftover from a development version of the code.

Fixes: 183819bfd9efac8c184d9bf123325719b7eee30f
(cherry picked from commit fe4d8b0c80eaeca3381be302eeb89aba871a7e7c)
2024-05-23 11:28:20 +03:00
Lasse Collin
005f039864 xz: Add braces to a for-statement and to an if-statement
No functional changes.

Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a
Fixes: 479fd58d60622331fcbe48fddf756927b9f80d9a
(cherry picked from commit 9bef5b8d17dd5e009d6a6b2becc2dc535da53937)
2024-05-23 11:28:20 +03:00
Lasse Collin
34be4e6aa6 liblzma: Omit an unneeded array from the x86 filter
Fixes: 6aa2a6deeba04808a0fe4461396e7fb70277f3d4
(cherry picked from commit de06b9f0c0a3f72569829ecadbc9c0a3ef099f57)
2024-05-23 11:28:20 +03:00
Lasse Collin
79e329b771 CMake: Add test_suffix.sh to the tests
(cherry picked from commit 7da488cb933fdf51cfc14cb5810beb0766224380)
2024-05-23 11:28:20 +03:00
Lasse Collin
86f33bb90c Test: Add CMake support to test_suffix.sh
It needs to find the xz executable from a different directory
and work without config.h.

(cherry picked from commit a805594ed0b4cbf7b81aa28ff46a8ab3c83c6876)
2024-05-23 11:28:20 +03:00
Lasse Collin
1e243ab378 Update INSTALL about MINIX 3
The latest stable is 3.3.0 and it's from 2014.
Don't mention the older versions in INSTALL.
3.3.0 ships with Clang already.

Testing with 3.4.0beta6 shows that tuklib_physmem
works too so omit comments about that from INSTALL.
Visibility warnigns weren't a problem either.

Thus it's enough to mention the need for --disable-threads
as configure doesn't autodetect the lack of pthreads.

(cherry picked from commit 50e19489387774bab3c4a988397d0d9c7a142a46)
2024-05-23 00:13:43 +03:00