mirror of
https://github.com/PCSX2/xz.git
synced 2026-02-04 19:31:17 +01:00
Compare commits
156 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
265e5ffb70 | ||
|
|
3dfa915cd1 | ||
|
|
6b65e84bd4 | ||
|
|
4da8e1d833 | ||
|
|
f6dc9996b0 | ||
|
|
67d62a375a | ||
|
|
283c03fe5b | ||
|
|
0c7fe9f227 | ||
|
|
b46fe3ced9 | ||
|
|
6ed0554a15 | ||
|
|
0ab300ec52 | ||
|
|
b274ad02c4 | ||
|
|
4fdcccd85e | ||
|
|
f229fa32bf | ||
|
|
94a1a869ee | ||
|
|
0e50ad7129 | ||
|
|
9fd333d742 | ||
|
|
495aaf3a5b | ||
|
|
ac6c8921d1 | ||
|
|
d1b0276aaf | ||
|
|
cac72956b1 | ||
|
|
2cdf0875de | ||
|
|
0168b6c8fb | ||
|
|
13337714e8 | ||
|
|
ccc728d829 | ||
|
|
948f5865fe | ||
|
|
64228d0d5c | ||
|
|
98d3368ef4 | ||
|
|
ba3b5dd082 | ||
|
|
3d4575f236 | ||
|
|
b9f0584e3e | ||
|
|
cc41bcaf77 | ||
|
|
e34025d666 | ||
|
|
0b6168974f | ||
|
|
41e436076c | ||
|
|
c33efefd4e | ||
|
|
e560c82f1f | ||
|
|
05192b32e5 | ||
|
|
0f35eafe51 | ||
|
|
fc9eaf81d7 | ||
|
|
090c69dda5 | ||
|
|
1f35331332 | ||
|
|
1415f1d946 | ||
|
|
41913949b9 | ||
|
|
3dffda33f4 | ||
|
|
b69900ed0b | ||
|
|
cf4a1e1879 | ||
|
|
cb94bb6d1f | ||
|
|
b7dee202d5 | ||
|
|
265e7b44d8 | ||
|
|
78c2f8db90 | ||
|
|
91750dff8f | ||
|
|
e11888a79a | ||
|
|
f39ddd88f3 | ||
|
|
cb84e27802 | ||
|
|
f01780fce4 | ||
|
|
d98ede7d70 | ||
|
|
19b447b64b | ||
|
|
45edf2966f | ||
|
|
b065984e5a | ||
|
|
32be621f52 | ||
|
|
efb07cfba6 | ||
|
|
e3c8be1369 | ||
|
|
ad8282efe4 | ||
|
|
9271a3eb0e | ||
|
|
211b931cee | ||
|
|
9f62fd9605 | ||
|
|
1d05980f5b | ||
|
|
fb68497333 | ||
|
|
75013db6d4 | ||
|
|
e44b21839b | ||
|
|
fd3dbb23ca | ||
|
|
05a735d279 | ||
|
|
4e6d62793b | ||
|
|
dd95b5e761 | ||
|
|
20778053a0 | ||
|
|
2cefa84af6 | ||
|
|
433fec191a | ||
|
|
711fa680f5 | ||
|
|
3d7ab1dc61 | ||
|
|
ef8b8e5f11 | ||
|
|
75c149bc80 | ||
|
|
456307ebf9 | ||
|
|
4c310b8a29 | ||
|
|
ec32b79366 | ||
|
|
dd06f40e4d | ||
|
|
c66808d1f5 | ||
|
|
556c22dfed | ||
|
|
dd13b66bf5 | ||
|
|
a0223bf796 | ||
|
|
86e57e4bfe | ||
|
|
13e44a94da | ||
|
|
2f90345e13 | ||
|
|
8d4864f53f | ||
|
|
35e9c58abb | ||
|
|
532b3e4c56 | ||
|
|
afb6ce8c82 | ||
|
|
7c3ba2ed5c | ||
|
|
f55db9c187 | ||
|
|
203edff4c7 | ||
|
|
f0a8f95c21 | ||
|
|
b7ad23fa78 | ||
|
|
4e19fbb04a | ||
|
|
c6fa03a427 | ||
|
|
7b6ffc9864 | ||
|
|
bfac2be502 | ||
|
|
df85e15671 | ||
|
|
d06d32f108 | ||
|
|
636fdcfbf5 | ||
|
|
55fd02f83e | ||
|
|
4052f36053 | ||
|
|
0f25758459 | ||
|
|
70f03b51ff | ||
|
|
f138bdf76a | ||
|
|
2c144a0365 | ||
|
|
edf339227a | ||
|
|
7fcc6334ea | ||
|
|
631f4d3ae6 | ||
|
|
c89faf4c9e | ||
|
|
6fe2fc9b6a | ||
|
|
6c4d4db2bc | ||
|
|
844f84fcad | ||
|
|
240e8b9791 | ||
|
|
e32cb264ea | ||
|
|
65cff45f8f | ||
|
|
316c67ffda | ||
|
|
1931175eea | ||
|
|
841dc1f891 | ||
|
|
0f7e2d3624 | ||
|
|
793d857e01 | ||
|
|
afcff45cee | ||
|
|
22159c6ba2 | ||
|
|
5e34990595 | ||
|
|
1125611b9b | ||
|
|
3f8fa53837 | ||
|
|
320d734c20 | ||
|
|
2ee4edeffc | ||
|
|
73f56fb87d | ||
|
|
4ce1cf97a8 | ||
|
|
972f05d7a4 | ||
|
|
28154eeaf6 | ||
|
|
aa95516d3d | ||
|
|
58f52c72f4 | ||
|
|
162779682e | ||
|
|
45553f9b4b | ||
|
|
af9d48d551 | ||
|
|
d099ef9f51 | ||
|
|
df87249b26 | ||
|
|
68c453e1c7 | ||
|
|
b441d39855 | ||
|
|
82d5164839 | ||
|
|
6decc8b418 | ||
|
|
ecda90061d | ||
|
|
0fda1ae5b1 | ||
|
|
00be32978f | ||
|
|
7232fcf96b |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,7 +1,6 @@
|
||||
*~
|
||||
*.bak
|
||||
*.bak[0-9]
|
||||
.gdb_history
|
||||
|
||||
.deps
|
||||
.libs
|
||||
@@ -30,7 +29,6 @@ build-aux/depcomp
|
||||
build-aux/install-sh
|
||||
build-aux/ltmain.sh
|
||||
build-aux/missing
|
||||
build-aux/test-driver
|
||||
|
||||
/src/liblzma/liblzma.pc
|
||||
/src/lzmainfo/lzmainfo
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
@@ -56,7 +56,7 @@ patent must be licensed for everyone's free use or not licensed at all.
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
@@ -10,7 +10,7 @@
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
@@ -112,7 +112,7 @@ modification follow. Pay close attention to the difference between a
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
@@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
@@ -432,7 +432,7 @@ decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
@@ -455,7 +455,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
@@ -500,3 +500,5 @@ necessary. Here is a sample; alter the names:
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
|
||||
100
INSTALL
100
INSTALL
@@ -122,10 +122,6 @@ XZ Utils Installation
|
||||
This can be worked around by passing gl_cv_cc_visibility=no
|
||||
as an argument to the configure script.
|
||||
|
||||
test_scripts.sh in "make check" may fail if good enough tools are
|
||||
missing from PATH (/usr/xpg4/bin or /usr/xpg6/bin). See sections
|
||||
4.5 and 3.2 for more information.
|
||||
|
||||
|
||||
1.2.6. Tru64
|
||||
|
||||
@@ -136,33 +132,21 @@ XZ Utils Installation
|
||||
|
||||
1.2.7. Windows
|
||||
|
||||
Building XZ Utils on Windows is supported under the following
|
||||
environments:
|
||||
Building XZ Utils on Windows is supported under MinGW + MSYS,
|
||||
MinGW-w64 + MSYS, and Cygwin. There is windows/build.bash to
|
||||
ease packaging XZ Utils with MinGW(-w64) + MSYS into a
|
||||
redistributable .zip or .7z file. See windows/INSTALL-Windows.txt
|
||||
for more information.
|
||||
|
||||
- MinGW-w64 + MSYS (32-bit and 64-bit x86): This is used
|
||||
for building the official binary packages for Windows.
|
||||
There is windows/build.bash to ease packaging XZ Utils with
|
||||
MinGW(-w64) + MSYS into a redistributable .zip or .7z file.
|
||||
See windows/INSTALL-MinGW.txt for more information.
|
||||
|
||||
- MinGW + MSYS (32-bit x86): I haven't recently tested this.
|
||||
|
||||
- Cygwin 1.7.35 and later: NOTE that using XZ Utils >= 5.2.0
|
||||
under Cygwin older than 1.7.35 can lead to DATA LOSS! If
|
||||
you must use an old Cygwin version, stick to XZ Utils 5.0.x
|
||||
which is safe under older Cygwin versions. You can check
|
||||
the Cygwin version with the command "cygcheck -V".
|
||||
|
||||
- Microsoft Visual Studio 2013 update 2 or later (MSVC for short):
|
||||
See windows/INSTALL-MSVC.txt for more information.
|
||||
|
||||
It may be possible to build liblzma with other toolchains too, but
|
||||
that will probably require writing a separate makefile. Building
|
||||
It might be possible to build liblzma with a non-GNU toolchain too,
|
||||
but that will probably require writing a separate makefile. Building
|
||||
the command line tools with non-GNU toolchains will be harder than
|
||||
building only liblzma.
|
||||
|
||||
Even if liblzma is built with MinGW(-w64), the resulting DLL can
|
||||
be used by other compilers and linkers, including MSVC. See
|
||||
Even if liblzma is built with MinGW, the resulting DLL or static
|
||||
library can be used by other compilers and linkers, including MSVC.
|
||||
Thus, it shouldn't be a problem to use MinGW to build liblzma even
|
||||
if you cannot use MinGW to build the rest of your project. See
|
||||
windows/README-Windows.txt for details.
|
||||
|
||||
|
||||
@@ -331,42 +315,16 @@ XZ Utils Installation
|
||||
the amount of RAM on the operating system you use. See
|
||||
src/common/tuklib_physmem.c for details.
|
||||
|
||||
--enable-threads=METHOD
|
||||
Threading support is enabled by default so normally there
|
||||
is no need to specify this option.
|
||||
--disable-threads
|
||||
Disable threading support. This makes some things
|
||||
thread-unsafe, meaning that if multithreaded application
|
||||
calls liblzma functions from more than one thread,
|
||||
something bad may happen.
|
||||
|
||||
Supported values for METHOD:
|
||||
|
||||
yes Autodetect the threading method. If none
|
||||
is found, configure will give an error.
|
||||
|
||||
posix Use POSIX pthreads. This is the default
|
||||
except on Windows outside Cygwin.
|
||||
|
||||
win95 Use Windows 95 compatible threads. This
|
||||
is compatible with Windows XP and later
|
||||
too. This is the default for 32-bit x86
|
||||
Windows builds. The `win95' threading is
|
||||
incompatible with --enable-small.
|
||||
|
||||
vista Use Windows Vista compatible threads. The
|
||||
resulting binaries won't run on Windows XP
|
||||
or older. This is the default for Windows
|
||||
excluding 32-bit x86 builds (that is, on
|
||||
x86-64 the default is `vista').
|
||||
|
||||
no Disable threading support. This is the
|
||||
same as using --disable-threads.
|
||||
NOTE: If combined with --enable-small, the
|
||||
resulting liblzma won't be thread safe,
|
||||
that is, if a multi-threaded application
|
||||
calls any liblzma functions from more than
|
||||
one thread, something bad may happen.
|
||||
|
||||
--enable-symbol-versions
|
||||
Use symbol versioning for liblzma. This is enabled by
|
||||
default on GNU/Linux, other GNU-based systems, and
|
||||
FreeBSD.
|
||||
Use this option if threading support causes you trouble,
|
||||
or if you know that you will use liblzma only from
|
||||
single-threaded applications and want to avoid dependency
|
||||
on libpthread.
|
||||
|
||||
--enable-debug
|
||||
This enables the assert() macro and possibly some other
|
||||
@@ -437,16 +395,11 @@ XZ Utils Installation
|
||||
gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
|
||||
script.
|
||||
|
||||
xzdiff (xzcmp/lzdiff/lzcmp) may use mktemp if it is available. As
|
||||
a fallback xzdiff will use mkdir to securely create a temporary
|
||||
directory. Having mktemp available is still recommended since the
|
||||
mkdir fallback method isn't as robust as mktemp is. The original
|
||||
mktemp can be found from <http://www.mktemp.org/>. On GNU, most will
|
||||
use the mktemp program from GNU coreutils instead of the original
|
||||
implementation. Both mktemp versions are fine.
|
||||
|
||||
In addition to using xz to decompress .xz files, xzgrep and xzdiff
|
||||
use gzip, bzip2, and lzop to support .gz, bz2, and .lzo files.
|
||||
Some of the scripts require also mktemp. The original mktemp can be
|
||||
found from <http://www.mktemp.org/>. On GNU, most will use the mktemp
|
||||
program from GNU coreutils instead of the original implementation.
|
||||
Both mktemp versions are fine for XZ Utils (and practically for
|
||||
everything else too).
|
||||
|
||||
|
||||
3.2. PATH
|
||||
@@ -487,8 +440,7 @@ XZ Utils Installation
|
||||
to POSIX. The configure script tries to find such a shell. If
|
||||
it fails, you can force the shell to be used by passing
|
||||
gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
|
||||
script. Alternatively you can omit the installation of scripts and
|
||||
this error by passing --disable-scripts to configure.
|
||||
script.
|
||||
|
||||
|
||||
4.3. configure works but build fails at crc32_x86.S
|
||||
|
||||
@@ -37,7 +37,6 @@ dist_examples_DATA = \
|
||||
doc/examples/01_compress_easy.c \
|
||||
doc/examples/02_decompress.c \
|
||||
doc/examples/03_compress_custom.c \
|
||||
doc/examples/04_compress_easy_mt.c \
|
||||
doc/examples/Makefile
|
||||
|
||||
examplesolddir = $(docdir)/examples_old
|
||||
@@ -99,7 +98,6 @@ dist-hook:
|
||||
|
||||
# This works with GNU tar and gives cleaner package than normal 'make dist'.
|
||||
mydist:
|
||||
sh "$(srcdir)/src/liblzma/validate_map.sh"
|
||||
VERSION=$(VERSION); \
|
||||
if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
|
||||
SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
|
||||
|
||||
260
NEWS
260
NEWS
@@ -2,266 +2,6 @@
|
||||
XZ Utils Release Notes
|
||||
======================
|
||||
|
||||
5.2.2 (2015-09-29)
|
||||
|
||||
* Fixed bugs in QNX-specific code.
|
||||
|
||||
* Omitted the use of pipe2() even if it is available to avoid
|
||||
portability issues with some old Linux and glibc combinations.
|
||||
|
||||
* Updated German translation.
|
||||
|
||||
* Added project files to build static and shared liblzma (not the
|
||||
whole XZ Utils) with Visual Studio 2013 update 2 or later.
|
||||
|
||||
* Documented that threaded decompression hasn't been implemented
|
||||
yet. A 5.2.0 NEWS entry describing multi-threading support had
|
||||
incorrectly said "decompression" when it should have said
|
||||
"compression".
|
||||
|
||||
|
||||
5.2.1 (2015-02-26)
|
||||
|
||||
* Fixed a compression-ratio regression in fast mode of LZMA1 and
|
||||
LZMA2. The bug is present in 5.1.4beta and 5.2.0 releases.
|
||||
|
||||
* Fixed a portability problem in xz that affected at least OpenBSD.
|
||||
|
||||
* Fixed xzdiff to be compatible with FreeBSD's mktemp which differs
|
||||
from most other mktemp implementations.
|
||||
|
||||
* Changed CPU core count detection to use cpuset_getaffinity() on
|
||||
FreeBSD.
|
||||
|
||||
|
||||
5.2.0 (2014-12-21)
|
||||
|
||||
Since 5.1.4beta:
|
||||
|
||||
* All fixes from 5.0.8
|
||||
|
||||
* liblzma: Fixed lzma_stream_encoder_mt_memusage() when a preset
|
||||
was used.
|
||||
|
||||
* xzdiff: If mktemp isn't installed, mkdir will be used as
|
||||
a fallback to create a temporary directory. Installing mktemp
|
||||
is still recommended.
|
||||
|
||||
* Updated French, German, Italian, Polish, and Vietnamese
|
||||
translations.
|
||||
|
||||
Summary of fixes and new features added in the 5.1.x development
|
||||
releases:
|
||||
|
||||
* liblzma:
|
||||
|
||||
- Added support for multi-threaded compression. See the
|
||||
lzma_mt structure, lzma_stream_encoder_mt(), and
|
||||
lzma_stream_encoder_mt_memusage() in <lzma/container.h>,
|
||||
lzma_get_progress() in <lzma/base.h>, and lzma_cputhreads()
|
||||
in <lzma/hardware.h> for details.
|
||||
|
||||
- Made the uses of lzma_allocator const correct.
|
||||
|
||||
- Added lzma_block_uncomp_encode() to create uncompressed
|
||||
.xz Blocks using LZMA2 uncompressed chunks.
|
||||
|
||||
- Added support for LZMA_IGNORE_CHECK.
|
||||
|
||||
- A few speed optimizations were made.
|
||||
|
||||
- Added support for symbol versioning. It is enabled by default
|
||||
on GNU/Linux, other GNU-based systems, and FreeBSD.
|
||||
|
||||
- liblzma (not the whole XZ Utils) should now be buildable
|
||||
with MSVC 2013 update 2 or later using windows/config.h.
|
||||
|
||||
* xz:
|
||||
|
||||
- Fixed a race condition in the signal handling. It was
|
||||
possible that e.g. the first SIGINT didn't make xz exit
|
||||
if reading or writing blocked and one had bad luck. The fix
|
||||
is non-trivial, so as of writing it is unknown if it will be
|
||||
backported to the v5.0 branch.
|
||||
|
||||
- Multi-threaded compression can be enabled with the
|
||||
--threads (-T) option.
|
||||
[Fixed: This originally said "decompression".]
|
||||
|
||||
- New command line options in xz: --single-stream,
|
||||
--block-size=SIZE, --block-list=SIZES,
|
||||
--flush-timeout=TIMEOUT, and --ignore-check.
|
||||
|
||||
- xz -lvv now shows the minimum xz version that is required to
|
||||
decompress the file. Currently it is 5.0.0 for all supported
|
||||
.xz files except files with empty LZMA2 streams require 5.0.2.
|
||||
|
||||
* xzdiff and xzgrep now support .lzo files if lzop is installed.
|
||||
The .tzo suffix is also recognized as a shorthand for .tar.lzo.
|
||||
|
||||
|
||||
5.1.4beta (2014-09-14)
|
||||
|
||||
* All fixes from 5.0.6
|
||||
|
||||
* liblzma: Fixed the use of presets in threaded encoder
|
||||
initialization.
|
||||
|
||||
* xz --block-list and --block-size can now be used together
|
||||
in single-threaded mode. Previously the combination only
|
||||
worked in multi-threaded mode.
|
||||
|
||||
* Added support for LZMA_IGNORE_CHECK to liblzma and made it
|
||||
available in xz as --ignore-check.
|
||||
|
||||
* liblzma speed optimizations:
|
||||
|
||||
- Initialization of a new LZMA1 or LZMA2 encoder has been
|
||||
optimized. (The speed of reinitializing an already-allocated
|
||||
encoder isn't affected.) This helps when compressing many
|
||||
small buffers with lzma_stream_buffer_encode() and other
|
||||
similar situations where an already-allocated encoder state
|
||||
isn't reused. This speed-up is visible in xz too if one
|
||||
compresses many small files one at a time instead running xz
|
||||
once and giving all files as command-line arguments.
|
||||
|
||||
- Buffer comparisons are now much faster when unaligned access
|
||||
is allowed (configured with --enable-unaligned-access). This
|
||||
speeds up encoding significantly. There is arch-specific code
|
||||
for 32-bit and 64-bit x86 (32-bit needs SSE2 for the best
|
||||
results and there's no run-time CPU detection for now).
|
||||
For other archs there is only generic code which probably
|
||||
isn't as optimal as arch-specific solutions could be.
|
||||
|
||||
- A few speed optimizations were made to the SHA-256 code.
|
||||
(Note that the builtin SHA-256 code isn't used on all
|
||||
operating systems.)
|
||||
|
||||
* liblzma can now be built with MSVC 2013 update 2 or later
|
||||
using windows/config.h.
|
||||
|
||||
* Vietnamese translation was added.
|
||||
|
||||
|
||||
5.1.3alpha (2013-10-26)
|
||||
|
||||
* All fixes from 5.0.5
|
||||
|
||||
* liblzma:
|
||||
|
||||
- Fixed a deadlock in the threaded encoder.
|
||||
|
||||
- Made the uses of lzma_allocator const correct.
|
||||
|
||||
- Added lzma_block_uncomp_encode() to create uncompressed
|
||||
.xz Blocks using LZMA2 uncompressed chunks.
|
||||
|
||||
- Added support for native threads on Windows and the ability
|
||||
to detect the number of CPU cores.
|
||||
|
||||
* xz:
|
||||
|
||||
- Fixed a race condition in the signal handling. It was
|
||||
possible that e.g. the first SIGINT didn't make xz exit
|
||||
if reading or writing blocked and one had bad luck. The fix
|
||||
is non-trivial, so as of writing it is unknown if it will be
|
||||
backported to the v5.0 branch.
|
||||
|
||||
- Made the progress indicator work correctly in threaded mode.
|
||||
|
||||
- Threaded encoder now works together with --block-list=SIZES.
|
||||
|
||||
- Added preliminary support for --flush-timeout=TIMEOUT.
|
||||
It can be useful for (somewhat) real-time streaming. For
|
||||
now the decompression side has to be done with something
|
||||
else than the xz tool due to how xz does buffering, but this
|
||||
should be fixed.
|
||||
|
||||
|
||||
5.1.2alpha (2012-07-04)
|
||||
|
||||
* All fixes from 5.0.3 and 5.0.4
|
||||
|
||||
* liblzma:
|
||||
|
||||
- Fixed a deadlock and an invalid free() in the threaded encoder.
|
||||
|
||||
- Added support for symbol versioning. It is enabled by default
|
||||
on GNU/Linux, other GNU-based systems, and FreeBSD.
|
||||
|
||||
- Use SHA-256 implementation from the operating system if one is
|
||||
available in libc, libmd, or libutil. liblzma won't use e.g.
|
||||
OpenSSL or libgcrypt to avoid introducing new dependencies.
|
||||
|
||||
- Fixed liblzma.pc for static linking.
|
||||
|
||||
- Fixed a few portability bugs.
|
||||
|
||||
* xz --decompress --single-stream now fixes the input position after
|
||||
successful decompression. Now the following works:
|
||||
|
||||
echo foo | xz > foo.xz
|
||||
echo bar | xz >> foo.xz
|
||||
( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
|
||||
|
||||
Note that it doesn't work if the input is not seekable
|
||||
or if there is Stream Padding between the concatenated
|
||||
.xz Streams.
|
||||
|
||||
* xz -lvv now shows the minimum xz version that is required to
|
||||
decompress the file. Currently it is 5.0.0 for all supported .xz
|
||||
files except files with empty LZMA2 streams require 5.0.2.
|
||||
|
||||
* Added an *incomplete* implementation of --block-list=SIZES to xz.
|
||||
It only works correctly in single-threaded mode and when
|
||||
--block-size isn't used at the same time. --block-list allows
|
||||
specifying the sizes of Blocks which can be useful e.g. when
|
||||
creating files for random-access reading.
|
||||
|
||||
|
||||
5.1.1alpha (2011-04-12)
|
||||
|
||||
* All fixes from 5.0.2
|
||||
|
||||
* liblzma fixes that will also be included in 5.0.3:
|
||||
|
||||
- A memory leak was fixed.
|
||||
|
||||
- lzma_stream_buffer_encode() no longer creates an empty .xz
|
||||
Block if encoding an empty buffer. Such an empty Block with
|
||||
LZMA2 data would trigger a bug in 5.0.1 and older (see the
|
||||
first bullet point in 5.0.2 notes). When releasing 5.0.2,
|
||||
I thought that no encoder creates this kind of files but
|
||||
I was wrong.
|
||||
|
||||
- Validate function arguments better in a few functions. Most
|
||||
importantly, specifying an unsupported integrity check to
|
||||
lzma_stream_buffer_encode() no longer creates a corrupt .xz
|
||||
file. Probably no application tries to do that, so this
|
||||
shouldn't be a big problem in practice.
|
||||
|
||||
- Document that lzma_block_buffer_encode(),
|
||||
lzma_easy_buffer_encode(), lzma_stream_encoder(), and
|
||||
lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
|
||||
|
||||
- The return values of the _memusage() functions are now
|
||||
documented better.
|
||||
|
||||
* Support for multithreaded compression was added using the simplest
|
||||
method, which splits the input data into blocks and compresses
|
||||
them independently. Other methods will be added in the future.
|
||||
The current method has room for improvement, e.g. it is possible
|
||||
to reduce the memory usage.
|
||||
|
||||
* Added the options --single-stream and --block-size=SIZE to xz.
|
||||
|
||||
* xzdiff and xzgrep now support .lzo files if lzop is installed.
|
||||
The .tzo suffix is also recognized as a shorthand for .tar.lzo.
|
||||
|
||||
* Support for short 8.3 filenames under DOS was added to xz. It is
|
||||
experimental and may change before it gets into a stable release.
|
||||
|
||||
|
||||
5.0.8 (2014-12-21)
|
||||
|
||||
* Fixed an old bug in xzgrep that affected OpenBSD and probably
|
||||
|
||||
18
THANKS
18
THANKS
@@ -21,7 +21,6 @@ has been important. :-) In alphabetical order:
|
||||
- Milo Casagrande
|
||||
- Marek Černocký
|
||||
- Tomer Chachamu
|
||||
- Gabi Davar
|
||||
- Chris Donawa
|
||||
- Andrew Dudman
|
||||
- Markus Duft
|
||||
@@ -30,28 +29,19 @@ has been important. :-) In alphabetical order:
|
||||
- Gilles Espinasse
|
||||
- Denis Excoffier
|
||||
- Michael Felt
|
||||
- Michael Fox
|
||||
- Mike Frysinger
|
||||
- Daniel Richard G.
|
||||
- Bill Glessner
|
||||
- Jason Gorski
|
||||
- Juan Manuel Guerrero
|
||||
- Diederik de Haas
|
||||
- Joachim Henke
|
||||
- Christian Hesse
|
||||
- Vincenzo Innocente
|
||||
- Peter Ivanov
|
||||
- Jouk Jansen
|
||||
- Jun I Jin
|
||||
- Per Øyvind Karlsen
|
||||
- Thomas Klausner
|
||||
- Richard Koch
|
||||
- Ville Koskinen
|
||||
- Jan Kratochvil
|
||||
- Christian Kujau
|
||||
- Stephan Kulow
|
||||
- Peter Lawler
|
||||
- James M Leddy
|
||||
- Hin-Tak Leung
|
||||
- Andraž 'ruskie' Levstik
|
||||
- Cary Lewis
|
||||
@@ -60,7 +50,6 @@ has been important. :-) In alphabetical order:
|
||||
- Bela Lubkin
|
||||
- Gregory Margo
|
||||
- Jim Meyering
|
||||
- Arkadiusz Miskiewicz
|
||||
- Conley Moorhous
|
||||
- Rafał Mużyło
|
||||
- Adrien Nader
|
||||
@@ -69,36 +58,29 @@ has been important. :-) In alphabetical order:
|
||||
- Andre Noll
|
||||
- Peter O'Gorman
|
||||
- Peter Pallinger
|
||||
- Rui Paulo
|
||||
- Igor Pavlov
|
||||
- Diego Elio Pettenò
|
||||
- Elbert Pol
|
||||
- Mikko Pouru
|
||||
- Trần Ngọc Quân
|
||||
- Pavel Raiskup
|
||||
- Ole André Vadla Ravnås
|
||||
- Robert Readman
|
||||
- Bernhard Reutner-Fischer
|
||||
- Eric S. Raymond
|
||||
- Cristian Rodríguez
|
||||
- Christian von Roques
|
||||
- Torsten Rupp
|
||||
- Jukka Salmi
|
||||
- Alexandre Sauvé
|
||||
- Benno Schulenberg
|
||||
- Andreas Schwab
|
||||
- Dan Shechter
|
||||
- Stuart Shelton
|
||||
- Brad Smith
|
||||
- Jonathan Stott
|
||||
- Dan Stromberg
|
||||
- Vincent Torri
|
||||
- Paul Townsend
|
||||
- Mohammed Adnène Trojette
|
||||
- Alexey Tourbin
|
||||
- Patrick J. Volkerding
|
||||
- Martin Väth
|
||||
- Adam Walling
|
||||
- Christian Weisgerber
|
||||
- Bert Wesarg
|
||||
- Fredrik Wikstrom
|
||||
|
||||
58
TODO
58
TODO
@@ -28,36 +28,14 @@ Known bugs
|
||||
time and calculated (de)compression speed won't make sense in the
|
||||
progress indicator (xz --verbose).
|
||||
|
||||
If liblzma has created threads and fork() gets called, liblzma
|
||||
code will break in the child process unless it calls exec() and
|
||||
doesn't touch liblzma.
|
||||
|
||||
|
||||
Missing features
|
||||
----------------
|
||||
|
||||
Add support for storing metadata in .xz files. A preliminary
|
||||
idea is to create a new Stream type for metadata. When both
|
||||
metadata and data are wanted in the same .xz file, two or more
|
||||
Streams would be concatenated.
|
||||
|
||||
The state stored in lzma_stream should be cloneable, which would
|
||||
be mostly useful when using a preset dictionary in LZMA2, but
|
||||
it may have other uses too. Compare to deflateCopy() in zlib.
|
||||
|
||||
Support LZMA_FINISH in raw decoder to indicate end of LZMA1 and
|
||||
other streams that don't have an end of payload marker.
|
||||
|
||||
Adjust dictionary size when the input file size is known.
|
||||
Maybe do this only if an option is given.
|
||||
|
||||
xz doesn't support copying extended attributes, access control
|
||||
lists etc. from source to target file.
|
||||
|
||||
Multithreaded compression:
|
||||
- Reduce memory usage of the current method.
|
||||
- Implement threaded match finders.
|
||||
- Implement pigz-style threading in LZMA2.
|
||||
Multithreaded compression
|
||||
|
||||
Multithreaded decompression
|
||||
|
||||
@@ -68,44 +46,18 @@ Missing features
|
||||
It will be a separate library that supports uncompressed, .gz,
|
||||
.bz2, .lzma, and .xz files.
|
||||
|
||||
Support changing lzma_options_lzma.mode with lzma_filters_update().
|
||||
|
||||
Support LZMA_FULL_FLUSH for lzma_stream_decoder() to stop at
|
||||
Block and Stream boundaries.
|
||||
|
||||
lzma_strerror() to convert lzma_ret to human readable form?
|
||||
This is tricky, because the same error codes are used with
|
||||
slightly different meanings, and this cannot be fixed anymore.
|
||||
|
||||
Make it possible to adjust LZMA2 options in the middle of a Block
|
||||
so that the encoding speed vs. compression ratio can be optimized
|
||||
when the compressed data is streamed over network.
|
||||
|
||||
Improved BCJ filters. The current filters are small but they aren't
|
||||
so great when compressing binary packages that contain various file
|
||||
types. Specifically, they make things worse if there are static
|
||||
libraries or Linux kernel modules. The filtering could also be
|
||||
more effective (without getting overly complex), for example,
|
||||
streamable variant BCJ2 from 7-Zip could be implemented.
|
||||
|
||||
Filter that autodetects specific data types in the input stream
|
||||
and applies appropriate filters for the corrects parts of the input.
|
||||
Perhaps combine this with the BCJ filter improvement point above.
|
||||
|
||||
Long-range LZ77 method as a separate filter or as a new LZMA2
|
||||
match finder.
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
More tutorial programs are needed for liblzma.
|
||||
Some tutorial is needed for liblzma. I have planned to write some
|
||||
extremely well commented example programs, which would work as
|
||||
a tutorial. I suppose the Doxygen tags are quite OK as a quick
|
||||
reference once one is familiar with the liblzma API.
|
||||
|
||||
Document the LZMA1 and LZMA2 algorithms.
|
||||
|
||||
|
||||
Miscellaneous
|
||||
------------
|
||||
|
||||
Try to get the media type for .xz registered at IANA.
|
||||
|
||||
|
||||
@@ -21,4 +21,4 @@ sed -n 's/LZMA_VERSION_STABILITY_ALPHA/alpha/
|
||||
src/liblzma/api/lzma/version.h \
|
||||
| tr '\n' '|' \
|
||||
| sed 's/|/./; s/|/./; s/|//g' \
|
||||
| tr -d '\r\n'
|
||||
| tr -d '\n'
|
||||
|
||||
239
configure.ac
239
configure.ac
@@ -34,8 +34,8 @@ AC_CANONICAL_HOST
|
||||
|
||||
# We do some special things on Windows (32-bit or 64-bit) builds.
|
||||
case $host_os in
|
||||
mingw* | cygwin | msys) is_w32=yes ;;
|
||||
*) is_w32=no ;;
|
||||
mingw* | cygwin*) is_w32=yes ;;
|
||||
*) is_w32=no ;;
|
||||
esac
|
||||
AM_CONDITIONAL([COND_W32], [test "$is_w32" = yes])
|
||||
|
||||
@@ -43,15 +43,9 @@ AM_CONDITIONAL([COND_W32], [test "$is_w32" = yes])
|
||||
# executables. Cygwin is an exception to this, since it is recommended
|
||||
# that symlinks don't have the .exe suffix. To make this work, we
|
||||
# define LN_EXEEXT.
|
||||
#
|
||||
# MSYS2 is treated the same way as Cygwin. It uses plain "msys" like
|
||||
# the original MSYS when building MSYS/MSYS2-binaries. Hopefully this
|
||||
# doesn't break things for the original MSYS developers. Note that this
|
||||
# doesn't affect normal MSYS/MSYS2 users building non-MSYS/MSYS2 binaries
|
||||
# since in that case the $host_os is usually mingw32.
|
||||
case $host_os in
|
||||
cygwin | msys) LN_EXEEXT= ;;
|
||||
*) LN_EXEEXT='$(EXEEXT)' ;;
|
||||
cygwin) LN_EXEEXT= ;;
|
||||
*) LN_EXEEXT='$(EXEEXT)' ;;
|
||||
esac
|
||||
AC_SUBST([LN_EXEEXT])
|
||||
|
||||
@@ -289,7 +283,7 @@ if test "x$enable_assembler" = xyes; then
|
||||
case $host_os in
|
||||
# Darwin should work too but only if not creating universal
|
||||
# binaries. Solaris x86 could work too but I cannot test.
|
||||
linux* | *bsd* | mingw* | cygwin | msys | *djgpp*)
|
||||
linux* | *bsd* | mingw* | cygwin* | *djgpp*)
|
||||
case $host_cpu in
|
||||
i?86) enable_assembler=x86 ;;
|
||||
x86_64) enable_assembler=x86_64 ;;
|
||||
@@ -334,47 +328,15 @@ AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes)
|
||||
#############
|
||||
|
||||
AC_MSG_CHECKING([if threading support is wanted])
|
||||
AC_ARG_ENABLE([threads], AS_HELP_STRING([--enable-threads=METHOD],
|
||||
[Supported METHODS are `yes', `no', `posix', `win95', and
|
||||
`vista'. The default is `yes'. Using `no' together with
|
||||
--enable-small makes liblzma thread unsafe.]),
|
||||
AC_ARG_ENABLE([threads], AS_HELP_STRING([--disable-threads],
|
||||
[Disable threading support.
|
||||
This makes some things thread-unsafe.]),
|
||||
[], [enable_threads=yes])
|
||||
|
||||
if test "x$enable_threads" = xyes; then
|
||||
case $host_os in
|
||||
mingw*)
|
||||
case $host_cpu in
|
||||
i?86) enable_threads=win95 ;;
|
||||
*) enable_threads=vista ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
enable_threads=posix
|
||||
;;
|
||||
esac
|
||||
if test "x$enable_threads" != xyes && test "x$enable_threads" != xno; then
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([--enable-threads accepts only `yes' or `no'])
|
||||
fi
|
||||
|
||||
case $enable_threads in
|
||||
posix | win95 | vista)
|
||||
AC_MSG_RESULT([yes, $enable_threads])
|
||||
;;
|
||||
no)
|
||||
AC_MSG_RESULT([no])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([--enable-threads only accepts `yes', `no', `posix', `win95', or `vista'])
|
||||
;;
|
||||
esac
|
||||
|
||||
# The Win95 threading lacks thread-safe one-time initialization function.
|
||||
# It's better to disallow it instead of allowing threaded but thread-unsafe
|
||||
# build.
|
||||
if test "x$enable_small$enable_threads" = xyeswin95; then
|
||||
AC_MSG_ERROR([--enable-threads=win95 and --enable-small cannot be
|
||||
used at the same time])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$enable_threads])
|
||||
# We use the actual result a little later.
|
||||
|
||||
|
||||
@@ -447,52 +409,20 @@ AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc],
|
||||
AM_CONDITIONAL([COND_DOC], [test x$enable_doc != xno])
|
||||
|
||||
|
||||
#####################
|
||||
# Symbol versioning #
|
||||
#####################
|
||||
|
||||
AC_MSG_CHECKING([if library symbol versioning should be used])
|
||||
AC_ARG_ENABLE([symbol-versions], [AS_HELP_STRING([--enable-symbol-versions],
|
||||
[Use symbol versioning for liblzma. Enabled by default on
|
||||
GNU/Linux, other GNU-based systems, and FreeBSD.])],
|
||||
[], [enable_symbol_versions=auto])
|
||||
if test "x$enable_symbol_versions" = xauto; then
|
||||
case $host_os in
|
||||
# NOTE: Even if one omits -gnu on GNU/Linux (e.g.
|
||||
# i486-slackware-linux), configure will (via config.sub)
|
||||
# append -gnu (e.g. i486-slackware-linux-gnu), and this
|
||||
# test will work correctly.
|
||||
gnu* | *-gnu* | freebsd*)
|
||||
enable_symbol_versions=yes
|
||||
;;
|
||||
*)
|
||||
enable_symbol_versions=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT([$enable_symbol_versions])
|
||||
AM_CONDITIONAL([COND_SYMVERS], [test "x$enable_symbol_versions" = xyes])
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Checks for programs.
|
||||
###############################################################################
|
||||
|
||||
echo
|
||||
gl_POSIX_SHELL
|
||||
if test -z "$POSIX_SHELL" && test "x$enable_scripts" = xyes ; then
|
||||
if test -z "$POSIX_SHELL" ; then
|
||||
AC_MSG_ERROR([No POSIX conforming shell (sh) was found.])
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Initializing Automake:"
|
||||
|
||||
# We don't use "subdir-objects" yet because it breaks "make distclean" when
|
||||
# dependencies are enabled (as of Automake 1.14.1) due to this bug:
|
||||
# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354
|
||||
# The -Wno-unsupported is used to silence warnings about missing
|
||||
# "subdir-objects".
|
||||
AM_INIT_AUTOMAKE([1.12 foreign tar-v7 filename-length-max=99 serial-tests -Wno-unsupported])
|
||||
AM_INIT_AUTOMAKE([1.12 foreign tar-v7 filename-length-max=99 serial-tests])
|
||||
AC_PROG_LN_S
|
||||
|
||||
AC_PROG_CC_C99
|
||||
@@ -504,49 +434,18 @@ AM_PROG_CC_C_O
|
||||
AM_PROG_AS
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
case $enable_threads in
|
||||
posix)
|
||||
echo
|
||||
echo "POSIX threading support:"
|
||||
AX_PTHREAD([:]) dnl We don't need the HAVE_PTHREAD macro.
|
||||
LIBS="$LIBS $PTHREAD_LIBS"
|
||||
AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
|
||||
if test "x$enable_threads" = xyes; then
|
||||
echo
|
||||
echo "Threading support:"
|
||||
AX_PTHREAD
|
||||
LIBS="$LIBS $PTHREAD_LIBS"
|
||||
AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
|
||||
|
||||
dnl NOTE: PTHREAD_CC is ignored. It would be useful on AIX,
|
||||
dnl but it's tricky to get it right together with
|
||||
dnl AC_PROG_CC_C99. Thus, this is handled by telling the
|
||||
dnl user in INSTALL to set the correct CC manually.
|
||||
|
||||
AC_DEFINE([MYTHREAD_POSIX], [1],
|
||||
[Define to 1 when using POSIX threads (pthreads).])
|
||||
|
||||
# These are nice to have but not mandatory.
|
||||
#
|
||||
# FIXME: xz uses clock_gettime if it is available and can do
|
||||
# it even when threading is disabled. Moving this outside
|
||||
# of pthread detection may be undesirable because then
|
||||
# liblzma may get linked against librt even when librt isn't
|
||||
# needed by liblzma.
|
||||
OLD_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
AC_SEARCH_LIBS([clock_gettime], [rt])
|
||||
AC_CHECK_FUNCS([clock_gettime pthread_condattr_setclock])
|
||||
AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include <time.h>]])
|
||||
CFLAGS=$OLD_CFLAGS
|
||||
;;
|
||||
win95)
|
||||
AC_DEFINE([MYTHREAD_WIN95], [1], [Define to 1 when using
|
||||
Windows 95 (and thus XP) compatible threads.
|
||||
This avoids use of features that were added in
|
||||
Windows Vista.])
|
||||
;;
|
||||
vista)
|
||||
AC_DEFINE([MYTHREAD_VISTA], [1], [Define to 1 when using
|
||||
Windows Vista compatible threads. This uses
|
||||
features that are not available on Windows XP.])
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL([COND_THREADS], [test "x$enable_threads" != xno])
|
||||
dnl NOTE: PTHREAD_CC is ignored. It would be useful on AIX, but
|
||||
dnl it's tricky to get it right together with AC_PROG_CC_C99.
|
||||
dnl Thus, this is handled by telling the user in INSTALL to set
|
||||
dnl the correct CC manually.
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Initializing Libtool:"
|
||||
@@ -570,7 +469,6 @@ echo "Initializing gettext:"
|
||||
AM_GNU_GETTEXT_VERSION([0.18])
|
||||
AM_GNU_GETTEXT([external])
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Checks for header files.
|
||||
###############################################################################
|
||||
@@ -584,9 +482,6 @@ AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h],
|
||||
[],
|
||||
[AC_MSG_ERROR([Required header file(s) are missing.])])
|
||||
|
||||
# This allows the use of the intrinsic functions if they are available.
|
||||
AC_CHECK_HEADERS([immintrin.h])
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
@@ -632,78 +527,12 @@ gl_GETOPT
|
||||
# Find the best function to set timestamps.
|
||||
AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break])
|
||||
|
||||
# This is nice to have but not mandatory.
|
||||
AC_CHECK_FUNCS([posix_fadvise])
|
||||
|
||||
TUKLIB_PROGNAME
|
||||
TUKLIB_INTEGER
|
||||
TUKLIB_PHYSMEM
|
||||
TUKLIB_CPUCORES
|
||||
TUKLIB_MBSTR
|
||||
|
||||
# Check for system-provided SHA-256. At least the following is supported:
|
||||
#
|
||||
# OS Headers Library Type Function
|
||||
# FreeBSD sys/types.h + sha256.h libmd SHA256_CTX SHA256_Init
|
||||
# NetBSD sys/types.h + sha2.h SHA256_CTX SHA256_Init
|
||||
# OpenBSD sys/types.h + sha2.h SHA2_CTX SHA256Init
|
||||
# Solaris sys/types.h + sha2.h libmd SHA256_CTX SHA256Init
|
||||
# MINIX 3 sys/types.h + minix/sha2.h libutil SHA256_CTX SHA256_Init
|
||||
# Darwin CommonCrypto/CommonDigest.h CC_SHA256_CTX CC_SHA256_Init
|
||||
#
|
||||
# Note that Darwin's CC_SHA256_Update takes buffer size as uint32_t instead
|
||||
# of size_t.
|
||||
#
|
||||
# We don't check for e.g. OpenSSL or libgcrypt because we don't want
|
||||
# to introduce dependencies to other packages by default. Maybe such
|
||||
# libraries could be supported via additional configure options though.
|
||||
#
|
||||
if test "x$enable_check_sha256" = "xyes"; then
|
||||
# Test for Common Crypto before others, because Darwin has sha256.h
|
||||
# too and we don't want to use that, because on older versions it
|
||||
# uses OpenSSL functions, whose SHA256_Init is not guaranteed to
|
||||
# succeed.
|
||||
sha256_header_found=no
|
||||
AC_CHECK_HEADERS(
|
||||
[CommonCrypto/CommonDigest.h sha256.h sha2.h minix/sha2.h],
|
||||
[sha256_header_found=yes ; break])
|
||||
if test "x$sha256_header_found" = xyes; then
|
||||
AC_CHECK_TYPES([CC_SHA256_CTX, SHA256_CTX, SHA2_CTX], [], [],
|
||||
[[#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
|
||||
# include <CommonCrypto/CommonDigest.h>
|
||||
#endif
|
||||
#ifdef HAVE_SHA256_H
|
||||
# include <sha256.h>
|
||||
#endif
|
||||
#ifdef HAVE_SHA2_H
|
||||
# include <sha2.h>
|
||||
#endif
|
||||
#ifdef HAVE_MINIX_SHA2_H
|
||||
# include <minix/sha2.h>
|
||||
#endif]])
|
||||
AC_SEARCH_LIBS([SHA256_Init], [md util])
|
||||
AC_SEARCH_LIBS([SHA256Init], [md])
|
||||
AC_CHECK_FUNCS([CC_SHA256_Init SHA256_Init SHA256Init],
|
||||
[break])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([COND_INTERNAL_SHA256],
|
||||
[test "x$ac_cv_func_SHA256_Init" != xyes \
|
||||
&& test "x$ac_cv_func_SHA256Init" != xyes \
|
||||
&& test "x$ac_cv_func_CC_SHA256_Init" != xyes])
|
||||
|
||||
# Check for SSE2 intrinsics.
|
||||
AC_CHECK_DECL([_mm_movemask_epi8],
|
||||
[AC_DEFINE([HAVE__MM_MOVEMASK_EPI8], [1],
|
||||
[Define to 1 if _mm_movemask_epi8 is available.])],
|
||||
[],
|
||||
[#ifdef HAVE_IMMINTRIN_H
|
||||
#include <immintrin.h>
|
||||
#endif])
|
||||
|
||||
|
||||
###############################################################################
|
||||
# If using GCC, set some additional AM_CFLAGS:
|
||||
@@ -828,15 +657,9 @@ if test x$tuklib_cv_physmem_method = xunknown; then
|
||||
echo "or make a patch to add support for this operating system."
|
||||
fi
|
||||
|
||||
if test x$tuklib_cv_cpucores_method = xunknown; then
|
||||
echo
|
||||
echo "WARNING:"
|
||||
echo "No supported method to detect the number of CPU cores."
|
||||
fi
|
||||
|
||||
if test "x$enable_threads$enable_small" = xnoyes; then
|
||||
echo
|
||||
echo "NOTE:"
|
||||
echo "liblzma will be thread unsafe due the combination"
|
||||
echo "of --disable-threads --enable-small."
|
||||
fi
|
||||
# Not threading yet so don't warn.
|
||||
#if test x$tuklib_cv_cpucores_method = xunknown; then
|
||||
# echo
|
||||
# echo "WARNING:"
|
||||
# echo "No supported method to detect the number of CPU cores."
|
||||
#fi
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include "lzma.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define CHUNK 64
|
||||
|
||||
|
||||
static lzma_stream strm = LZMA_STREAM_INIT;
|
||||
static FILE *file_in;
|
||||
@@ -24,6 +22,7 @@ static FILE *file_in;
|
||||
static void
|
||||
encode(size_t size, lzma_action action)
|
||||
{
|
||||
static const size_t CHUNK = 64;
|
||||
uint8_t in[CHUNK];
|
||||
uint8_t out[CHUNK];
|
||||
lzma_ret ret;
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include "lzma.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define CHUNK 64
|
||||
|
||||
|
||||
static lzma_stream strm = LZMA_STREAM_INIT;
|
||||
static FILE *file_in;
|
||||
@@ -24,6 +22,7 @@ static FILE *file_in;
|
||||
static void
|
||||
encode(size_t size, lzma_action action)
|
||||
{
|
||||
static const size_t CHUNK = 64;
|
||||
uint8_t in[CHUNK];
|
||||
uint8_t out[CHUNK];
|
||||
lzma_ret ret;
|
||||
|
||||
@@ -25,7 +25,3 @@ List of examples
|
||||
a custom filter chain
|
||||
(x86 BCJ + LZMA2)
|
||||
|
||||
04_compress_easy_mt.c Multi-threaded multi-call
|
||||
compression using a compression
|
||||
preset
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ init_encoder(lzma_stream *strm)
|
||||
// Use the default preset (6) for LZMA2.
|
||||
//
|
||||
// The lzma_options_lzma structure and the lzma_lzma_preset() function
|
||||
// are declared in lzma/lzma12.h (src/liblzma/api/lzma/lzma12.h in the
|
||||
// source package or e.g. /usr/include/lzma/lzma12.h depending on
|
||||
// are declared in lzma/lzma.h (src/liblzma/api/lzma/lzma.h in the
|
||||
// source package or e.g. /usr/include/lzma/lzma.h depending on
|
||||
// the install prefix).
|
||||
lzma_options_lzma opt_lzma2;
|
||||
if (lzma_lzma_preset(&opt_lzma2, LZMA_PRESET_DEFAULT)) {
|
||||
@@ -48,7 +48,7 @@ init_encoder(lzma_stream *strm)
|
||||
// Now we could customize the LZMA2 options if we wanted. For example,
|
||||
// we could set the the dictionary size (opt_lzma2.dict_size) to
|
||||
// something else than the default (8 MiB) of the default preset.
|
||||
// See lzma/lzma12.h for details of all LZMA2 options.
|
||||
// See lzma/lzma.h for details of all LZMA2 options.
|
||||
//
|
||||
// The x86 BCJ filter will try to modify the x86 instruction stream so
|
||||
// that LZMA2 can compress it better. The x86 BCJ filter doesn't need
|
||||
|
||||
@@ -1,206 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file 04_compress_easy_mt.c
|
||||
/// \brief Compress in multi-call mode using LZMA2 in multi-threaded mode
|
||||
///
|
||||
/// Usage: ./04_compress_easy_mt < INFILE > OUTFILE
|
||||
///
|
||||
/// Example: ./04_compress_easy_mt < foo > foo.xz
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <lzma.h>
|
||||
|
||||
|
||||
static bool
|
||||
init_encoder(lzma_stream *strm)
|
||||
{
|
||||
// The threaded encoder takes the options as pointer to
|
||||
// a lzma_mt structure.
|
||||
lzma_mt mt = {
|
||||
// No flags are needed.
|
||||
.flags = 0,
|
||||
|
||||
// Let liblzma determine a sane block size.
|
||||
.block_size = 0,
|
||||
|
||||
// Use no timeout for lzma_code() calls by setting timeout
|
||||
// to zero. That is, sometimes lzma_code() might block for
|
||||
// a long time (from several seconds to even minutes).
|
||||
// If this is not OK, for example due to progress indicator
|
||||
// needing updates, specify a timeout in milliseconds here.
|
||||
// See the documentation of lzma_mt in lzma/container.h for
|
||||
// information how to choose a reasonable timeout.
|
||||
.timeout = 0,
|
||||
|
||||
// Use the default preset (6) for LZMA2.
|
||||
// To use a preset, filters must be set to NULL.
|
||||
.preset = LZMA_PRESET_DEFAULT,
|
||||
.filters = NULL,
|
||||
|
||||
// Use CRC64 for integrity checking. See also
|
||||
// 01_compress_easy.c about choosing the integrity check.
|
||||
.check = LZMA_CHECK_CRC64,
|
||||
};
|
||||
|
||||
// Detect how many threads the CPU supports.
|
||||
mt.threads = lzma_cputhreads();
|
||||
|
||||
// If the number of CPU cores/threads cannot be detected,
|
||||
// use one thread. Note that this isn't the same as the normal
|
||||
// single-threaded mode as this will still split the data into
|
||||
// blocks and use more RAM than the normal single-threaded mode.
|
||||
// You may want to consider using lzma_easy_encoder() or
|
||||
// lzma_stream_encoder() instead of lzma_stream_encoder_mt() if
|
||||
// lzma_cputhreads() returns 0 or 1.
|
||||
if (mt.threads == 0)
|
||||
mt.threads = 1;
|
||||
|
||||
// If the number of CPU cores/threads exceeds threads_max,
|
||||
// limit the number of threads to keep memory usage lower.
|
||||
// The number 8 is arbitrarily chosen and may be too low or
|
||||
// high depending on the compression preset and the computer
|
||||
// being used.
|
||||
//
|
||||
// FIXME: A better way could be to check the amount of RAM
|
||||
// (or available RAM) and use lzma_stream_encoder_mt_memusage()
|
||||
// to determine if the number of threads should be reduced.
|
||||
const uint32_t threads_max = 8;
|
||||
if (mt.threads > threads_max)
|
||||
mt.threads = threads_max;
|
||||
|
||||
// Initialize the threaded encoder.
|
||||
lzma_ret ret = lzma_stream_encoder_mt(strm, &mt);
|
||||
|
||||
if (ret == LZMA_OK)
|
||||
return true;
|
||||
|
||||
const char *msg;
|
||||
switch (ret) {
|
||||
case LZMA_MEM_ERROR:
|
||||
msg = "Memory allocation failed";
|
||||
break;
|
||||
|
||||
case LZMA_OPTIONS_ERROR:
|
||||
// We are no longer using a plain preset so this error
|
||||
// message has been edited accordingly compared to
|
||||
// 01_compress_easy.c.
|
||||
msg = "Specified filter chain is not supported";
|
||||
break;
|
||||
|
||||
case LZMA_UNSUPPORTED_CHECK:
|
||||
msg = "Specified integrity check is not supported";
|
||||
break;
|
||||
|
||||
default:
|
||||
msg = "Unknown error, possibly a bug";
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Error initializing the encoder: %s (error code %u)\n",
|
||||
msg, ret);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// This function is identical to the one in 01_compress_easy.c.
|
||||
static bool
|
||||
compress(lzma_stream *strm, FILE *infile, FILE *outfile)
|
||||
{
|
||||
lzma_action action = LZMA_RUN;
|
||||
|
||||
uint8_t inbuf[BUFSIZ];
|
||||
uint8_t outbuf[BUFSIZ];
|
||||
|
||||
strm->next_in = NULL;
|
||||
strm->avail_in = 0;
|
||||
strm->next_out = outbuf;
|
||||
strm->avail_out = sizeof(outbuf);
|
||||
|
||||
while (true) {
|
||||
if (strm->avail_in == 0 && !feof(infile)) {
|
||||
strm->next_in = inbuf;
|
||||
strm->avail_in = fread(inbuf, 1, sizeof(inbuf),
|
||||
infile);
|
||||
|
||||
if (ferror(infile)) {
|
||||
fprintf(stderr, "Read error: %s\n",
|
||||
strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (feof(infile))
|
||||
action = LZMA_FINISH;
|
||||
}
|
||||
|
||||
lzma_ret ret = lzma_code(strm, action);
|
||||
|
||||
if (strm->avail_out == 0 || ret == LZMA_STREAM_END) {
|
||||
size_t write_size = sizeof(outbuf) - strm->avail_out;
|
||||
|
||||
if (fwrite(outbuf, 1, write_size, outfile)
|
||||
!= write_size) {
|
||||
fprintf(stderr, "Write error: %s\n",
|
||||
strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
strm->next_out = outbuf;
|
||||
strm->avail_out = sizeof(outbuf);
|
||||
}
|
||||
|
||||
if (ret != LZMA_OK) {
|
||||
if (ret == LZMA_STREAM_END)
|
||||
return true;
|
||||
|
||||
const char *msg;
|
||||
switch (ret) {
|
||||
case LZMA_MEM_ERROR:
|
||||
msg = "Memory allocation failed";
|
||||
break;
|
||||
|
||||
case LZMA_DATA_ERROR:
|
||||
msg = "File size limits exceeded";
|
||||
break;
|
||||
|
||||
default:
|
||||
msg = "Unknown error, possibly a bug";
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Encoder error: %s (error code %u)\n",
|
||||
msg, ret);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extern int
|
||||
main(void)
|
||||
{
|
||||
lzma_stream strm = LZMA_STREAM_INIT;
|
||||
|
||||
bool success = init_encoder(&strm);
|
||||
if (success)
|
||||
success = compress(&strm, stdin, stdout);
|
||||
|
||||
lzma_end(&strm);
|
||||
|
||||
if (fclose(stdout)) {
|
||||
fprintf(stderr, "Write error: %s\n", strerror(errno));
|
||||
success = false;
|
||||
}
|
||||
|
||||
return success ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
@@ -12,8 +12,7 @@ LDFLAGS = -llzma
|
||||
PROGS = \
|
||||
01_compress_easy \
|
||||
02_decompress \
|
||||
03_compress_custom \
|
||||
04_compress_easy_mt
|
||||
03_compress_custom
|
||||
|
||||
all: $(PROGS)
|
||||
|
||||
|
||||
@@ -113,7 +113,6 @@ SRCS_C = \
|
||||
../src/xz/list.c \
|
||||
../src/xz/main.c \
|
||||
../src/xz/message.c \
|
||||
../src/xz/mytime.c \
|
||||
../src/xz/options.c \
|
||||
../src/xz/signals.c \
|
||||
../src/xz/suffix.c \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Building XZ Utils for DOS
|
||||
=========================
|
||||
XZ Utils on DOS
|
||||
===============
|
||||
|
||||
Introduction
|
||||
|
||||
@@ -77,3 +77,12 @@ Building
|
||||
are not built. Having e.g. xzdec.exe doesn't save much space compared
|
||||
to xz.exe, because the DJGPP runtime makes the .exe quite big anyway.
|
||||
|
||||
|
||||
Bugs
|
||||
|
||||
xz doesn't necessarily work in Dosbox. It should work in DOSEMU.
|
||||
|
||||
Pressing Ctrl-c or Ctrl-Break won't remove the incomplete target file
|
||||
when running under Windows XP Command Prompt (something goes wrong
|
||||
with SIGINT handling). It works correctly under Windows 95/98/98SE/ME.
|
||||
|
||||
123
dos/README.txt
123
dos/README.txt
@@ -1,123 +0,0 @@
|
||||
|
||||
XZ Utils on DOS
|
||||
===============
|
||||
|
||||
DOS-specific filename handling
|
||||
|
||||
xz detects at runtime if long filename (LFN) support is
|
||||
available and will use it by default. It can be disabled by
|
||||
setting an environment variable:
|
||||
|
||||
set lfn=n
|
||||
|
||||
When xz is in LFN mode, it behaves pretty much the same as it
|
||||
does on other operating systems. Examples:
|
||||
|
||||
xz foo.tar -> foo.tar.xz
|
||||
xz -d foo.tar.xz -> foo.tar
|
||||
|
||||
xz -F lzma foo.tar -> foo.tar.lzma
|
||||
xz -d foo.tar.lzma -> foo.tar
|
||||
|
||||
When LFN support isn't available or it is disabled with LFN=n
|
||||
environment setting, xz works in short filename (SFN) mode. This
|
||||
affects filename suffix handling when compressing.
|
||||
|
||||
When compressing to the .xz format in SFN mode:
|
||||
|
||||
- Files without an extension get .xz just like on LFN systems.
|
||||
|
||||
- *.tar files become *.txz (shorthand for *.tar.xz). *.txz
|
||||
is recognized by xz on all supported operating systems.
|
||||
(Try to avoid confusing this with gzipped .txt files.)
|
||||
|
||||
- Files with 1-3 character extension have their extension modified
|
||||
so that the last character is a dash ("-"). If the extension
|
||||
is already three characters, the last character is lost. The
|
||||
resulting *.?- or *.??- filename is recognized in LFN mode, but
|
||||
it isn't recognized by xz on other operating systems.
|
||||
|
||||
Examples:
|
||||
|
||||
xz foo -> foo.xz | xz -d foo.xz -> foo
|
||||
xz foo.tar -> foo.txz | xz -d foo.txz -> foo.tar
|
||||
xz foo.c -> foo.c- | xz -d foo.c- -> foo.c
|
||||
xz read.me -> read.me- | xz -d read.me- -> read.me
|
||||
xz foo.txt -> foo.tx- | xz -d foo.tx- -> foo.tx !
|
||||
|
||||
Note that in the last example above, the third character of the
|
||||
filename extension is lost.
|
||||
|
||||
When compressing to the legacy .lzma format in SFN mode:
|
||||
|
||||
- *.tar files become *.tlz (shorthand for *.tar.lzma). *.tlz
|
||||
is recognized by xz on all supported operating systems.
|
||||
|
||||
- Other files become *.lzm. The original filename extension
|
||||
is lost. *.lzm is recognized also in LFN mode, but it is not
|
||||
recognized by xz on other operating systems.
|
||||
|
||||
Examples:
|
||||
|
||||
xz -F lzma foo -> foo.lzm | xz -d foo.lzm -> foo
|
||||
xz -F lzma foo.tar -> foo.tlz | xz -d foo.tlz -> foo.tar
|
||||
xz -F lzma foo.c -> foo.lzm | xz -d foo.lzm -> foo !
|
||||
xz -F lzma read.me -> read.lzm | xz -d read.lzm -> read !
|
||||
xz -F lzma foo.txt -> foo.lzm | xz -d foo.lzm -> foo !
|
||||
|
||||
When compressing with a custom suffix (-S .SUF, --suffix=.SUF) to
|
||||
any file format:
|
||||
|
||||
- If the suffix begins with a dot, the filename extension is
|
||||
replaced with the new suffix. The original extension is lost.
|
||||
|
||||
- If the suffix doesn't begin with a dot and the filename has no
|
||||
extension and the filename given on the command line doesn't
|
||||
have a dot at the end, the custom suffix is appended just like
|
||||
on LFN systems.
|
||||
|
||||
- If the suffix doesn't begin with a dot and the filename has
|
||||
an extension (or an extension-less filename is given with a dot
|
||||
at the end), the last 1-3 characters of the filename extension
|
||||
may get overwritten to fit the given custom suffix.
|
||||
|
||||
Examples:
|
||||
|
||||
xz -S x foo -> foox | xz -dS x foox -> foo
|
||||
xz -S x foo. -> foo.x | xz -dS x foo.x -> foo
|
||||
xz -S .x foo -> foo.x | xz -dS .x foo.x -> foo
|
||||
xz -S .x foo. -> foo.x | xz -dS .x foo.x -> foo
|
||||
xz -S x.y foo -> foox.y | xz -dS x.y foox.y -> foo
|
||||
xz -S .a foo.c -> foo.a | xz -dS .a foo.a -> foo !
|
||||
xz -S a foo.c -> foo.ca | xz -dS a foo.ca -> foo.c
|
||||
xz -S ab foo.c -> foo.cab | xz -dS ab foo.cab -> foo.c
|
||||
xz -S ab read.me -> read.mab | xz -dS ab read.mab -> read.m !
|
||||
xz -S ab foo.txt -> foo.tab | xz -dS ab foo.tab -> foo.t !
|
||||
xz -S abc foo.txt -> foo.abc | xz -dS abc foo.abc -> foo !
|
||||
|
||||
When decompressing, the suffix handling in SFN mode is the same as
|
||||
in LFN mode. The DOS-specific filenames *.lzm, *.?-, and *.??- are
|
||||
recognized also in LFN mode.
|
||||
|
||||
xz handles certain uncommon situations safely:
|
||||
|
||||
- If the generated output filename refers to the same file as
|
||||
the input file, xz detects this and refuses to compress or
|
||||
decompress the input file even if --force is used. This can
|
||||
happen when giving an overlong filename in SFN mode. E.g.
|
||||
"xz -S x foo.texinfo" would try to write to foo.tex which on
|
||||
SFN system is the same file as foo.texinfo.
|
||||
|
||||
- If the generated output filename is a special file like "con"
|
||||
or "prn", xz detects this and refuses to compress or decompress
|
||||
the input file even if --force is used.
|
||||
|
||||
|
||||
Bugs
|
||||
|
||||
xz doesn't necessarily work in Dosbox. It should work in DOSEMU.
|
||||
|
||||
Pressing Ctrl-c or Ctrl-Break won't remove the incomplete target file
|
||||
when running under Windows XP Command Prompt (something goes wrong
|
||||
with SIGINT handling). It works correctly under Windows 95/98/98SE/ME.
|
||||
|
||||
3
m4/.gitignore
vendored
3
m4/.gitignore
vendored
@@ -1,5 +1,4 @@
|
||||
codeset.m4
|
||||
fcntl-o.m4
|
||||
gettext.m4
|
||||
glibc2.m4
|
||||
glibc21.m4
|
||||
@@ -7,7 +6,6 @@ iconv.m4
|
||||
intdiv0.m4
|
||||
intl.m4
|
||||
intldir.m4
|
||||
intlmacosx.m4
|
||||
intmax.m4
|
||||
inttypes-pri.m4
|
||||
inttypes_h.m4
|
||||
@@ -29,7 +27,6 @@ printf-posix.m4
|
||||
progtest.m4
|
||||
size_max.m4
|
||||
stdint_h.m4
|
||||
threadlib.m4
|
||||
uintmax_t.m4
|
||||
ulonglong.m4
|
||||
visibility.m4
|
||||
|
||||
@@ -9,10 +9,8 @@
|
||||
# This information is used by tuklib_cpucores.c.
|
||||
#
|
||||
# Supported methods:
|
||||
# - GetSystemInfo(): Windows (including Cygwin)
|
||||
# - sysctl(): BSDs, OS/2
|
||||
# - sysconf(): GNU/Linux, Solaris, Tru64, IRIX, AIX, QNX, Cygwin (but
|
||||
# GetSystemInfo() is used on Cygwin)
|
||||
# - sysconf(): GNU/Linux, Solaris, Tru64, IRIX, AIX, Cygwin
|
||||
# - pstat_getdynamic(): HP-UX
|
||||
#
|
||||
# COPYING
|
||||
@@ -32,46 +30,10 @@ AC_CHECK_HEADERS([sys/param.h])
|
||||
AC_CACHE_CHECK([how to detect the number of available CPU cores],
|
||||
[tuklib_cv_cpucores_method], [
|
||||
|
||||
# Maybe checking $host_os would be enough but this matches what
|
||||
# tuklib_cpucores.c does.
|
||||
#
|
||||
# NOTE: IRIX has a compiler that doesn't error out with #error, so use
|
||||
# a non-compilable text instead of #error to generate an error.
|
||||
# Look for sysctl() solution first, because on OS/2, both sysconf()
|
||||
# and sysctl() pass the tests in this file, but only sysctl()
|
||||
# actually works.
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
int main(void) { return 0; }
|
||||
#else
|
||||
compile error
|
||||
#endif
|
||||
]])], [tuklib_cv_cpucores_method=special], [
|
||||
|
||||
# FreeBSD has both cpuset and sysctl. Look for cpuset first because
|
||||
# it's a better approach.
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <sys/param.h>
|
||||
#include <sys/cpuset.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
cpuset_t set;
|
||||
cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1,
|
||||
sizeof(set), &set);
|
||||
return 0;
|
||||
}
|
||||
]])], [tuklib_cv_cpucores_method=cpuset], [
|
||||
|
||||
# On OS/2, both sysconf() and sysctl() pass the tests in this file,
|
||||
# but only sysctl() works. On QNX it's the opposite: only sysconf() works
|
||||
# (although it assumes that _POSIX_SOURCE, _XOPEN_SOURCE, and _POSIX_C_SOURCE
|
||||
# are undefined or alternatively _QNX_SOURCE is defined).
|
||||
#
|
||||
# We test sysctl() first and intentionally break the sysctl() test on QNX
|
||||
# so that sysctl() is never used on QNX.
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#ifdef __QNX__
|
||||
compile error
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
@@ -120,14 +82,9 @@ main(void)
|
||||
]])], [tuklib_cv_cpucores_method=pstat_getdynamic], [
|
||||
|
||||
tuklib_cv_cpucores_method=unknown
|
||||
])])])])])])
|
||||
])])])])
|
||||
|
||||
case $tuklib_cv_cpucores_method in
|
||||
cpuset)
|
||||
AC_DEFINE([TUKLIB_CPUCORES_CPUSET], [1],
|
||||
[Define to 1 if the number of available CPU cores
|
||||
can be detected with cpuset(2).])
|
||||
;;
|
||||
sysctl)
|
||||
AC_DEFINE([TUKLIB_CPUCORES_SYSCTL], [1],
|
||||
[Define to 1 if the number of available CPU cores
|
||||
|
||||
@@ -46,7 +46,7 @@ main(void)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if unaligned memory access should be used])
|
||||
AC_ARG_ENABLE([unaligned-access], AS_HELP_STRING([--enable-unaligned-access],
|
||||
AC_ARG_ENABLE([unaligned-access], AC_HELP_STRING([--enable-unaligned-access],
|
||||
[Enable if the system supports *fast* unaligned memory access
|
||||
with 16-bit and 32-bit integers. By default, this is enabled
|
||||
only on x86, x86_64, and big endian PowerPC.]),
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#
|
||||
# Supported methods:
|
||||
#
|
||||
# - Windows (including Cygwin), OS/2, DJGPP (DOS), OpenVMS, AROS,
|
||||
# and QNX have operating-system specific functions.
|
||||
# - Windows (including Cygwin), OS/2, DJGPP (DOS), and OpenVMS have
|
||||
# operating-system specific functions.
|
||||
#
|
||||
# - AIX has _system_configuration.physmem.
|
||||
#
|
||||
@@ -54,7 +54,7 @@ AC_CACHE_CHECK([how to detect the amount of physical memory],
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__OS2__) \
|
||||
|| defined(__DJGPP__) || defined(__VMS) \
|
||||
|| defined(AMIGA) || defined(__AROS__) || defined(__QNX__)
|
||||
|| defined(AMIGA) || defined(__AROS__)
|
||||
int main(void) { return 0; }
|
||||
#else
|
||||
compile error
|
||||
|
||||
@@ -3,4 +3,3 @@ de
|
||||
fr
|
||||
it
|
||||
pl
|
||||
vi
|
||||
|
||||
371
po/fr.po
371
po/fr.po
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-utils\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2014-11-25 20:23+0100\n"
|
||||
"POT-Creation-Date: 2014-12-20 20:45+0200\n"
|
||||
"PO-Revision-Date: 2010-09-24 21;12+0200\n"
|
||||
"Last-Translator: Adrien Nader <adrien@notk.org>\n"
|
||||
"Language-Team: None\n"
|
||||
@@ -16,105 +16,63 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n==1) ? 0 : 1;\n"
|
||||
|
||||
#: src/xz/args.c:63
|
||||
#, c-format
|
||||
msgid "%s: Invalid argument to --block-list"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/args.c:73
|
||||
#, c-format
|
||||
msgid "%s: Too many arguments to --block-list"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/args.c:102
|
||||
msgid "0 can only be used as the last element in --block-list"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/args.c:406
|
||||
#: src/xz/args.c:333
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s : Format de fichier inconnu"
|
||||
|
||||
#: src/xz/args.c:429 src/xz/args.c:437
|
||||
#: src/xz/args.c:356 src/xz/args.c:364
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s : Type de vérification d'intégrité inconnu"
|
||||
|
||||
#: src/xz/args.c:473
|
||||
#: src/xz/args.c:382
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr "Un seul fichier peut être spécifié avec `--files' ou `--files0'."
|
||||
|
||||
#: src/xz/args.c:541
|
||||
#: src/xz/args.c:445
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "La variable d'environnement %s contient trop d'arguments"
|
||||
|
||||
#: src/xz/coder.c:110
|
||||
#: src/xz/coder.c:99
|
||||
msgid "Maximum number of filters is four"
|
||||
msgstr "Le nombre maximal de filtres est quatre"
|
||||
|
||||
#: src/xz/coder.c:129
|
||||
#: src/xz/coder.c:118
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr "La limite d'utilisation mémoire est trop basse pour la configuration de filtres donnée."
|
||||
|
||||
#: src/xz/coder.c:159
|
||||
#: src/xz/coder.c:139
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
msgstr "Utiliser un préréglage en mode `raw' est déconseillé."
|
||||
|
||||
#: src/xz/coder.c:161
|
||||
#: src/xz/coder.c:141
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr "Le détail des préréglages peut varier entre différentes versions du logiciel."
|
||||
|
||||
#: src/xz/coder.c:184
|
||||
#: src/xz/coder.c:164
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
msgstr "Le format .lzma ne prend en charge que le filtre LZMA1"
|
||||
|
||||
#: src/xz/coder.c:192
|
||||
#: src/xz/coder.c:172
|
||||
msgid "LZMA1 cannot be used with the .xz format"
|
||||
msgstr "Le filtre LZMA1 ne peut être utilisé avec le format .xz"
|
||||
|
||||
#: src/xz/coder.c:209
|
||||
msgid "The filter chain is incompatible with --flush-timeout"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/coder.c:215
|
||||
msgid "Switching to single-threaded mode due to --flush-timeout"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/coder.c:234
|
||||
#, c-format
|
||||
msgid "Using up to %<PRIu32> threads."
|
||||
msgstr "Jusqu'à %<PRIu32> threads seront utilisés."
|
||||
|
||||
#: src/xz/coder.c:247
|
||||
#: src/xz/coder.c:189
|
||||
msgid "Unsupported filter chain or filter options"
|
||||
msgstr "Enchaînement ou options de filtres non pris en charge"
|
||||
|
||||
#: src/xz/coder.c:255
|
||||
#: src/xz/coder.c:197
|
||||
#, c-format
|
||||
msgid "Decompression will need %s MiB of memory."
|
||||
msgstr "La décompression nécessitera %s MiB de mémoire."
|
||||
|
||||
#: src/xz/coder.c:290
|
||||
#, c-format
|
||||
msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Nombre de threads réduit de %s à %s pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
|
||||
|
||||
#: src/xz/coder.c:344
|
||||
#: src/xz/coder.c:254
|
||||
#, c-format
|
||||
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Taille du dictionnaire LZMA%c réduite de %s MiB à %s MiB pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
|
||||
|
||||
#: src/xz/file_io.c:90
|
||||
#, c-format
|
||||
msgid "Error creating a pipe: %s"
|
||||
msgstr "Impossible de créer un tube anonyme (pipe) : %s"
|
||||
|
||||
#: src/xz/file_io.c:166
|
||||
#, c-format
|
||||
msgid "%s: poll() failed: %s"
|
||||
msgstr "%s : L'appel à la fonction poll() a échoué : %s"
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
#. if the source file still exists, and if it does, does its
|
||||
@@ -125,153 +83,118 @@ msgstr "%s : L'appel à la fonction poll() a échoué : %s"
|
||||
#. it is possible that the user has put a new file in place
|
||||
#. of the original file, and in that case it obviously
|
||||
#. shouldn't be removed.
|
||||
#: src/xz/file_io.c:236
|
||||
#: src/xz/file_io.c:138
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr "%s : Le fichier a apparemment été déplacé, suppression annulée"
|
||||
|
||||
#: src/xz/file_io.c:243 src/xz/file_io.c:761
|
||||
#: src/xz/file_io.c:145 src/xz/file_io.c:586
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr "%s : Impossible de supprimer : %s"
|
||||
|
||||
#: src/xz/file_io.c:268
|
||||
#: src/xz/file_io.c:170
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr "%s : Impossible de modifier le propriétaire du fichier : %s"
|
||||
|
||||
#: src/xz/file_io.c:274
|
||||
#: src/xz/file_io.c:176
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr "%s : Impossible de modifier le groupe propriétaire du fichier : %s"
|
||||
|
||||
#: src/xz/file_io.c:293
|
||||
#: src/xz/file_io.c:195
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s : Impossible de modifier les permissions du fichier : %s"
|
||||
|
||||
# Note from translator on "file status flags".
|
||||
# The following entry is kept un-translated on purpose. It is difficult to
|
||||
# translate and should only happen in exceptional circumstances which means
|
||||
# that translating would:
|
||||
# - lose some of the meaning
|
||||
# - make it more difficult to look up in search engines; it might happen one in
|
||||
# a million times, if we dilute the error message in 20 languages, it will be
|
||||
# almost impossible to find an explanation and support for the error.
|
||||
#: src/xz/file_io.c:399
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard input: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:408
|
||||
#, c-format
|
||||
msgid "Error setting O_NONBLOCK on standard input: %s"
|
||||
msgstr "Impossible d'établir le drapeau O_NONBLOCK sur la sortie standard : %s"
|
||||
|
||||
#: src/xz/file_io.c:460 src/xz/file_io.c:522
|
||||
#: src/xz/file_io.c:338 src/xz/file_io.c:417
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s est un lien symbolique : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:551
|
||||
#: src/xz/file_io.c:452
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s est un répertoire : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:557
|
||||
#: src/xz/file_io.c:458
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s n'est pas un fichier régulier : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:574
|
||||
#: src/xz/file_io.c:475
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr "%s : Le fichier possède les bits `setuid' ou `setgid' : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:581
|
||||
#: src/xz/file_io.c:482
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr "%s : Le fichier possède le bit `sticky' : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:588
|
||||
#: src/xz/file_io.c:489
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr "%s : Le fichier d'entrée a plus d'un lien matériel : ignoré"
|
||||
|
||||
# See note from translator above titled "file status flags".
|
||||
#: src/xz/file_io.c:668
|
||||
#, c-format
|
||||
msgid "Error restoring the status flags to standard input: %s"
|
||||
msgstr ""
|
||||
|
||||
# See note from translator above titled "file status flags".
|
||||
#: src/xz/file_io.c:714
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard output: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:723
|
||||
#, c-format
|
||||
msgid "Error setting O_NONBLOCK on standard output: %s"
|
||||
msgstr "Impossible d'activer le drapeau O_NONBLOCK sur la sortie standard : %s"
|
||||
|
||||
#: src/xz/file_io.c:896
|
||||
#: src/xz/file_io.c:711
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr "Impossible de rétablir le drapeau O_APPEND sur la sortie standard : %s"
|
||||
|
||||
#: src/xz/file_io.c:908
|
||||
#: src/xz/file_io.c:723
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s : Impossible de fermer le fichier : %s"
|
||||
|
||||
#: src/xz/file_io.c:944 src/xz/file_io.c:1170
|
||||
#: src/xz/file_io.c:759 src/xz/file_io.c:943
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr "%s : Impossible de se déplacer dans le fichier pour créer un 'sparse file' : %s"
|
||||
|
||||
#: src/xz/file_io.c:1039
|
||||
#: src/xz/file_io.c:818
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s : Erreur d'écriture : %s"
|
||||
|
||||
#: src/xz/file_io.c:1059
|
||||
#: src/xz/file_io.c:841
|
||||
#, c-format
|
||||
msgid "%s: Error seeking the file: %s"
|
||||
msgstr "%s : Impossible de se déplacer dans le fichier : %s"
|
||||
|
||||
#: src/xz/file_io.c:1069
|
||||
#: src/xz/file_io.c:851
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr "%s : Fin de fichier inattendue"
|
||||
|
||||
#: src/xz/file_io.c:1128
|
||||
#: src/xz/file_io.c:901
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s : Erreur d'écriture : %s"
|
||||
|
||||
#: src/xz/hardware.c:107
|
||||
#: src/xz/hardware.c:100
|
||||
msgid "Disabled"
|
||||
msgstr "Désactivé"
|
||||
|
||||
#. TRANSLATORS: Test with "xz --info-memory" to see if
|
||||
#. the alignment looks nice.
|
||||
#: src/xz/hardware.c:126
|
||||
#: src/xz/hardware.c:119
|
||||
msgid "Total amount of physical memory (RAM): "
|
||||
msgstr "Quantité totale de mémoire physique (RAM) : "
|
||||
|
||||
#: src/xz/hardware.c:128
|
||||
#: src/xz/hardware.c:121
|
||||
msgid "Memory usage limit for compression: "
|
||||
msgstr "Limite d'utilisation pour la compression : "
|
||||
|
||||
#: src/xz/hardware.c:130
|
||||
#: src/xz/hardware.c:123
|
||||
msgid "Memory usage limit for decompression: "
|
||||
msgstr "Limite d'utilisation pour la décompression : "
|
||||
|
||||
#. TRANSLATORS: Indicates that there is no integrity check.
|
||||
#. This string is used in tables, so the width must not
|
||||
#. exceed ten columns with a fixed-width font.
|
||||
#: src/xz/list.c:65
|
||||
#: src/xz/list.c:62
|
||||
msgid "None"
|
||||
msgstr "Aucune"
|
||||
|
||||
@@ -280,60 +203,60 @@ msgstr "Aucune"
|
||||
#. strings are used in tables, so the width must not exceed ten
|
||||
#. columns with a fixed-width font. It's OK to omit the dash if
|
||||
#. you need space for one extra letter, but don't use spaces.
|
||||
#: src/xz/list.c:72
|
||||
#: src/xz/list.c:69
|
||||
msgid "Unknown-2"
|
||||
msgstr "Inconnue-2"
|
||||
|
||||
#: src/xz/list.c:73
|
||||
#: src/xz/list.c:70
|
||||
msgid "Unknown-3"
|
||||
msgstr "Inconnue-3"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
#: src/xz/list.c:72
|
||||
msgid "Unknown-5"
|
||||
msgstr "Inconnue-5"
|
||||
|
||||
#: src/xz/list.c:76
|
||||
#: src/xz/list.c:73
|
||||
msgid "Unknown-6"
|
||||
msgstr "Inconnue-6"
|
||||
|
||||
#: src/xz/list.c:77
|
||||
#: src/xz/list.c:74
|
||||
msgid "Unknown-7"
|
||||
msgstr "Inconnue-7"
|
||||
|
||||
#: src/xz/list.c:78
|
||||
#: src/xz/list.c:75
|
||||
msgid "Unknown-8"
|
||||
msgstr "Inconnue-8"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
#: src/xz/list.c:76
|
||||
msgid "Unknown-9"
|
||||
msgstr "Inconnue-9"
|
||||
|
||||
#: src/xz/list.c:81
|
||||
#: src/xz/list.c:78
|
||||
msgid "Unknown-11"
|
||||
msgstr "Inconnue-11"
|
||||
|
||||
#: src/xz/list.c:82
|
||||
#: src/xz/list.c:79
|
||||
msgid "Unknown-12"
|
||||
msgstr "Inconnue-12"
|
||||
|
||||
#: src/xz/list.c:83
|
||||
#: src/xz/list.c:80
|
||||
msgid "Unknown-13"
|
||||
msgstr "Inconnue-13"
|
||||
|
||||
#: src/xz/list.c:84
|
||||
#: src/xz/list.c:81
|
||||
msgid "Unknown-14"
|
||||
msgstr "Inconnue-14"
|
||||
|
||||
#: src/xz/list.c:85
|
||||
#: src/xz/list.c:82
|
||||
msgid "Unknown-15"
|
||||
msgstr "Inconnue-15"
|
||||
|
||||
#: src/xz/list.c:153
|
||||
#: src/xz/list.c:126
|
||||
#, c-format
|
||||
msgid "%s: File is empty"
|
||||
msgstr "%s : Le fichier est vide"
|
||||
|
||||
#: src/xz/list.c:158
|
||||
#: src/xz/list.c:131
|
||||
#, c-format
|
||||
msgid "%s: Too small to be a valid .xz file"
|
||||
msgstr "%s : Trop petit pour être un fichier xz valide."
|
||||
@@ -342,41 +265,41 @@ msgstr "%s : Trop petit pour être un fichier xz valide."
|
||||
#. to Ratio, the columns are right aligned. Check and Filename
|
||||
#. are left aligned. If you need longer words, it's OK to
|
||||
#. use two lines here. Test with "xz -l foo.xz".
|
||||
#: src/xz/list.c:671
|
||||
#: src/xz/list.c:629
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr "Flux Blocs Compressé Décompressé Ratio Vérif. Nom de fichier"
|
||||
|
||||
#: src/xz/list.c:711
|
||||
#: src/xz/list.c:669
|
||||
#, c-format
|
||||
msgid " Streams: %s\n"
|
||||
msgstr " Flux : %s\n"
|
||||
|
||||
#: src/xz/list.c:713
|
||||
#: src/xz/list.c:671
|
||||
#, c-format
|
||||
msgid " Blocks: %s\n"
|
||||
msgstr " Blocs : %s\n"
|
||||
|
||||
#: src/xz/list.c:715
|
||||
#: src/xz/list.c:673
|
||||
#, c-format
|
||||
msgid " Compressed size: %s\n"
|
||||
msgstr " Taille données avec compression : %s\n"
|
||||
|
||||
#: src/xz/list.c:718
|
||||
#: src/xz/list.c:676
|
||||
#, c-format
|
||||
msgid " Uncompressed size: %s\n"
|
||||
msgstr " Taille données sans compression : %s\n"
|
||||
|
||||
#: src/xz/list.c:721
|
||||
#: src/xz/list.c:679
|
||||
#, c-format
|
||||
msgid " Ratio: %s\n"
|
||||
msgstr " Ratio : %s\n"
|
||||
|
||||
#: src/xz/list.c:723
|
||||
#: src/xz/list.c:681
|
||||
#, c-format
|
||||
msgid " Check: %s\n"
|
||||
msgstr " Vérification : %s\n"
|
||||
|
||||
#: src/xz/list.c:724
|
||||
#: src/xz/list.c:682
|
||||
#, c-format
|
||||
msgid " Stream padding: %s\n"
|
||||
msgstr " Octets de rembourrage du flux : %s\n"
|
||||
@@ -384,7 +307,7 @@ msgstr " Octets de rembourrage du flux : %s\n"
|
||||
#. TRANSLATORS: The second line is column headings. All except
|
||||
#. Check are right aligned; Check is left aligned. Test with
|
||||
#. "xz -lv foo.xz".
|
||||
#: src/xz/list.c:752
|
||||
#: src/xz/list.c:710
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
|
||||
@@ -394,7 +317,7 @@ msgstr ""
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
#: src/xz/list.c:807
|
||||
#: src/xz/list.c:765
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
@@ -410,57 +333,52 @@ msgstr ""
|
||||
#. are right aligned. %*s is replaced with 0-120
|
||||
#. spaces to make the CheckVal column wide enough.
|
||||
#. Test with "xz -lvv foo.xz".
|
||||
#: src/xz/list.c:819
|
||||
#: src/xz/list.c:777
|
||||
#, c-format
|
||||
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
msgstr " ValVérif %*sEn-tête Drapeaux TailleComp UtilMém Filtres"
|
||||
|
||||
#: src/xz/list.c:897 src/xz/list.c:1072
|
||||
#: src/xz/list.c:855 src/xz/list.c:1024
|
||||
#, c-format
|
||||
msgid " Memory needed: %s MiB\n"
|
||||
msgstr " Mémoire nécessaire : %s MiB\n"
|
||||
|
||||
#: src/xz/list.c:899 src/xz/list.c:1074
|
||||
#: src/xz/list.c:857 src/xz/list.c:1026
|
||||
#, c-format
|
||||
msgid " Sizes in headers: %s\n"
|
||||
msgstr " Tailles stockées dans l'en-tête : %s\n"
|
||||
|
||||
#: src/xz/list.c:900 src/xz/list.c:1075
|
||||
#: src/xz/list.c:858 src/xz/list.c:1027
|
||||
msgid "Yes"
|
||||
msgstr "Oui"
|
||||
|
||||
#: src/xz/list.c:900 src/xz/list.c:1075
|
||||
#: src/xz/list.c:858 src/xz/list.c:1027
|
||||
msgid "No"
|
||||
msgstr "Non"
|
||||
|
||||
#: src/xz/list.c:901 src/xz/list.c:1076
|
||||
#, c-format
|
||||
msgid " Minimum XZ Utils version: %s\n"
|
||||
msgstr " Version minimale de XZ Utils : %s\n"
|
||||
|
||||
#. TRANSLATORS: %s is an integer. Only the plural form of this
|
||||
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
|
||||
#: src/xz/list.c:1051
|
||||
#: src/xz/list.c:1003
|
||||
#, c-format
|
||||
msgid "%s file\n"
|
||||
msgid_plural "%s files\n"
|
||||
msgstr[0] "%s fichier\n"
|
||||
msgstr[1] "%s fichiers\n"
|
||||
|
||||
#: src/xz/list.c:1064
|
||||
#: src/xz/list.c:1016
|
||||
msgid "Totals:"
|
||||
msgstr "Totaux :"
|
||||
|
||||
#: src/xz/list.c:1065
|
||||
#: src/xz/list.c:1017
|
||||
#, c-format
|
||||
msgid " Number of files: %s\n"
|
||||
msgstr " Nombre de fichiers : %s\n"
|
||||
|
||||
#: src/xz/list.c:1140
|
||||
#: src/xz/list.c:1089
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr "--list ne marche que sur les fichiers .xz (--format=xz ou --format=auto)"
|
||||
|
||||
#: src/xz/list.c:1146
|
||||
#: src/xz/list.c:1095
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr "--list est incompatible avec la lecture sur l'entrée standard"
|
||||
|
||||
@@ -491,68 +409,68 @@ msgstr "Impossible de lire à la fois les données et les noms de fichiers depui
|
||||
#. of the line in messages. Usually it becomes "xz: ".
|
||||
#. This is a translatable string because French needs
|
||||
#. a space before a colon.
|
||||
#: src/xz/message.c:713
|
||||
#: src/xz/message.c:733
|
||||
#, c-format
|
||||
msgid "%s: "
|
||||
msgstr "%s : "
|
||||
|
||||
#: src/xz/message.c:776 src/xz/message.c:826
|
||||
#: src/xz/message.c:796 src/xz/message.c:846
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Erreur interne (bug)"
|
||||
|
||||
#: src/xz/message.c:783
|
||||
#: src/xz/message.c:803
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Impossible d'installer le gestionnaire de signaux"
|
||||
|
||||
#: src/xz/message.c:792
|
||||
#: src/xz/message.c:812
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "Pas de données de vérification d'intégrité ; vérification non effectuée"
|
||||
|
||||
#: src/xz/message.c:795
|
||||
#: src/xz/message.c:815
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr "Méthode de vérification d'intégrité non prise en charge ; vérification non effectuée"
|
||||
|
||||
#: src/xz/message.c:802
|
||||
#: src/xz/message.c:822
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Limite d'utilisation mémoire atteinte"
|
||||
|
||||
#: src/xz/message.c:805
|
||||
#: src/xz/message.c:825
|
||||
msgid "File format not recognized"
|
||||
msgstr "Format de fichier inconnu"
|
||||
|
||||
#: src/xz/message.c:808
|
||||
#: src/xz/message.c:828
|
||||
msgid "Unsupported options"
|
||||
msgstr "Options non prises en charge"
|
||||
|
||||
#: src/xz/message.c:811
|
||||
#: src/xz/message.c:831
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Les données compressées sont corrompues"
|
||||
|
||||
#: src/xz/message.c:814
|
||||
#: src/xz/message.c:834
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Fin des données inattendue "
|
||||
|
||||
#: src/xz/message.c:847
|
||||
#: src/xz/message.c:867
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limiter is disabled."
|
||||
msgstr "%s MiB de mémoire sont nécessaires. La limite est désactivée."
|
||||
|
||||
#: src/xz/message.c:875
|
||||
#: src/xz/message.c:895
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "%s MiB de mémoire sont nécessaires, la limite étant %s."
|
||||
|
||||
#: src/xz/message.c:1042
|
||||
#: src/xz/message.c:1062
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s : Enchaînement de filtres : %s\n"
|
||||
|
||||
#: src/xz/message.c:1052
|
||||
#: src/xz/message.c:1072
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Éxécutez `%s --help' pour obtenir davantage d'informations."
|
||||
|
||||
#: src/xz/message.c:1078
|
||||
#: src/xz/message.c:1098
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
@@ -563,17 +481,17 @@ msgstr ""
|
||||
"Compresse ou decompresse FICHIER(s) au format .xz.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:1085
|
||||
#: src/xz/message.c:1105
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Les arguments obligatoires pour les options longues le sont aussi pour les\n"
|
||||
"options courtes.\n"
|
||||
|
||||
#: src/xz/message.c:1089
|
||||
#: src/xz/message.c:1109
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " Mode d'opération :\n"
|
||||
|
||||
#: src/xz/message.c:1092
|
||||
#: src/xz/message.c:1112
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
@@ -585,7 +503,7 @@ msgstr ""
|
||||
" -t, --test tester l'intégrité du fichier compressé\n"
|
||||
" -l, --list lister les informations sur les fichiers .xz"
|
||||
|
||||
#: src/xz/message.c:1098
|
||||
#: src/xz/message.c:1118
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
@@ -593,7 +511,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Modificateurs :\n"
|
||||
|
||||
#: src/xz/message.c:1101
|
||||
#: src/xz/message.c:1121
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
@@ -605,15 +523,7 @@ msgstr ""
|
||||
" -c, --stdout écrire sur la sortie standard et ne pas supprimer les\n"
|
||||
" fichiers d'entrée"
|
||||
|
||||
#: src/xz/message.c:1107
|
||||
msgid ""
|
||||
" --single-stream decompress only the first stream, and silently\n"
|
||||
" ignore possible remaining input data"
|
||||
msgstr ""
|
||||
" --single-stream décompresser uniquement le premier flux et ignorer\n"
|
||||
" silencieusement les données éventuellement restantes"
|
||||
|
||||
#: src/xz/message.c:1110
|
||||
#: src/xz/message.c:1127
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
@@ -629,7 +539,7 @@ msgstr ""
|
||||
" et doivent être suivis d'un caractère retour à la ligne\n"
|
||||
" --files0[=FILE] comme --files mais avec un caractère null comme séparateur"
|
||||
|
||||
#: src/xz/message.c:1119
|
||||
#: src/xz/message.c:1135
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
@@ -637,7 +547,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Options basiques de format de fichier et de compression :\n"
|
||||
|
||||
#: src/xz/message.c:1121
|
||||
#: src/xz/message.c:1137
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
@@ -649,13 +559,7 @@ msgstr ""
|
||||
" -C, --check=CHECK type de vérification d'intégrité : `none' (à utiliser avec\n"
|
||||
" précaution), `crc32', `crc64' (par défaut) ou `sha256'"
|
||||
|
||||
#: src/xz/message.c:1126
|
||||
msgid " --ignore-check don't verify the integrity check when decompressing"
|
||||
msgstr ""
|
||||
" --ignore-check ne pas vérifier l'intégrité des données lors de\n"
|
||||
" la décompression"
|
||||
|
||||
#: src/xz/message.c:1130
|
||||
#: src/xz/message.c:1144
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
@@ -664,7 +568,7 @@ msgstr ""
|
||||
" l'utilisation mémoire du compresseur *et* du décompresseur\n"
|
||||
" avant d'utiliser 7, 8 ou 9 !"
|
||||
|
||||
#: src/xz/message.c:1134
|
||||
#: src/xz/message.c:1148
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
@@ -673,44 +577,7 @@ msgstr ""
|
||||
" de temps processeur ;\n"
|
||||
" n'affecte pas les besoins mémoire du décompresseur"
|
||||
|
||||
#: src/xz/message.c:1138
|
||||
msgid ""
|
||||
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
|
||||
" to use as many threads as there are processor cores"
|
||||
msgstr ""
|
||||
" -T, --threads=NB créer au plus NB fils de compression (1 par défault) ; la\n"
|
||||
" valeur 0 est spéciale et équivaut au nombre de processeurs\n"
|
||||
" de la machine"
|
||||
|
||||
#: src/xz/message.c:1143
|
||||
msgid ""
|
||||
" --block-size=SIZE\n"
|
||||
" start a new .xz block after every SIZE bytes of input;\n"
|
||||
" use this to set the block size for threaded compression"
|
||||
msgstr ""
|
||||
" --block-size=TAILLE\n"
|
||||
" débuter un bloc XZ après chaque TAILLE octets de données\n"
|
||||
" d'entrée ; ce réglage sert pour la compression paralléle"
|
||||
|
||||
#: src/xz/message.c:1147
|
||||
msgid ""
|
||||
" --block-list=SIZES\n"
|
||||
" start a new .xz block after the given comma-separated\n"
|
||||
" intervals of uncompressed data"
|
||||
msgstr ""
|
||||
" --block-list=TAILLES\n"
|
||||
" débuter des blocs XZ après les TAILLES octets de données\n"
|
||||
" spécifiées avec des virgules pour séparateur"
|
||||
|
||||
#: src/xz/message.c:1151
|
||||
msgid ""
|
||||
" --flush-timeout=TIMEOUT\n"
|
||||
" when compressing, if more than TIMEOUT milliseconds has\n"
|
||||
" passed since the previous flush and reading more input\n"
|
||||
" would block, all pending data is flushed out"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1157
|
||||
#: src/xz/message.c:1153
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
@@ -726,7 +593,7 @@ msgstr ""
|
||||
" décompression ou les deux ; LIMIT est en octets,\n"
|
||||
" pourcentage de RAM, ou 0 pour la valeur par défaut"
|
||||
|
||||
#: src/xz/message.c:1164
|
||||
#: src/xz/message.c:1160
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
@@ -735,7 +602,7 @@ msgstr ""
|
||||
" d'utilisation mémoire, renvoyer une erreur plutôt que de\n"
|
||||
" diminuer les réglages"
|
||||
|
||||
#: src/xz/message.c:1170
|
||||
#: src/xz/message.c:1166
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
@@ -743,7 +610,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Chaîne de filtres de compression personnalisée (en lieu des préréglages) :"
|
||||
|
||||
#: src/xz/message.c:1179
|
||||
#: src/xz/message.c:1175
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
@@ -772,7 +639,7 @@ msgstr ""
|
||||
" depth=NUM profondeur de recherche maximale ;\n"
|
||||
" 0=automatique (par défaut)"
|
||||
|
||||
#: src/xz/message.c:1194
|
||||
#: src/xz/message.c:1190
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@@ -794,7 +661,7 @@ msgstr ""
|
||||
" OPTS valides pour tous les filtres BCJ :\n"
|
||||
" start=NUM position de début de la conversion (défaut=0)"
|
||||
|
||||
#: src/xz/message.c:1206
|
||||
#: src/xz/message.c:1202
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
@@ -806,7 +673,7 @@ msgstr ""
|
||||
" dist=NUM distance entre les octets soustraits les\n"
|
||||
" uns aux autres (1-256 ; 1)"
|
||||
|
||||
#: src/xz/message.c:1214
|
||||
#: src/xz/message.c:1210
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
@@ -814,7 +681,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Autres options :\n"
|
||||
|
||||
#: src/xz/message.c:1217
|
||||
#: src/xz/message.c:1213
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
@@ -823,17 +690,17 @@ msgstr ""
|
||||
" aussi masquer les erreurs\n"
|
||||
" -v, --verbose être bavard ; spécifier deux fois pour l'être davantage"
|
||||
|
||||
#: src/xz/message.c:1222
|
||||
#: src/xz/message.c:1218
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn les avertissements ne modifient pas le code de sortie"
|
||||
|
||||
#: src/xz/message.c:1224
|
||||
#: src/xz/message.c:1220
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr ""
|
||||
" --robot utiliser des messages lisibles par un programme\n"
|
||||
" (utile pour les scripts)"
|
||||
|
||||
#: src/xz/message.c:1227
|
||||
#: src/xz/message.c:1223
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
@@ -841,7 +708,7 @@ msgstr ""
|
||||
" --info-memory afficher la quantité totale de RAM ainsi que la limite\n"
|
||||
" actuelle d'utilisation mémoire puis quitter"
|
||||
|
||||
#: src/xz/message.c:1230
|
||||
#: src/xz/message.c:1226
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
@@ -849,7 +716,7 @@ msgstr ""
|
||||
" -h, --help afficher l'aide courte (ne liste que les options de base)\n"
|
||||
" -H, --long-help afficher l'aide longue (ceci) puis quitter"
|
||||
|
||||
#: src/xz/message.c:1234
|
||||
#: src/xz/message.c:1230
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
@@ -857,11 +724,11 @@ msgstr ""
|
||||
" -h, --help afficher l'aide courte (ceci) puis quitter\n"
|
||||
" -H, --long-help afficher l'aide longue (liste aussi les options avancées)"
|
||||
|
||||
#: src/xz/message.c:1239
|
||||
#: src/xz/message.c:1235
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version afficher le numéro de version puis quitter"
|
||||
|
||||
#: src/xz/message.c:1241
|
||||
#: src/xz/message.c:1237
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
@@ -873,22 +740,18 @@ msgstr ""
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1247
|
||||
#: src/xz/message.c:1243
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
"Signaler les bogues à <%s> (en anglais ou en finlandais).\n"
|
||||
"Signaler les bogues de traduction à <adrien@notk.org>.\n"
|
||||
|
||||
#: src/xz/message.c:1249
|
||||
#: src/xz/message.c:1245
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "Page du projet %s : <%s>\n"
|
||||
|
||||
#: src/xz/message.c:1253
|
||||
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
@@ -918,22 +781,22 @@ msgstr "La somme de lc et lp ne doit pas dépasser 4"
|
||||
msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
msgstr "Le `match finder' choisi nécessite au moins nice=%<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:133 src/xz/suffix.c:258
|
||||
#: src/xz/suffix.c:101 src/xz/suffix.c:194
|
||||
#, c-format
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s : Avec --format=raw, --suffix=.SUF est nécessaire sauf lors de l'écriture vers stdout"
|
||||
|
||||
#: src/xz/suffix.c:164
|
||||
#: src/xz/suffix.c:121
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s : Le fichier a un suffixe inconnu, ignoré"
|
||||
|
||||
#: src/xz/suffix.c:185
|
||||
#: src/xz/suffix.c:175 src/xz/suffix.c:184
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s : Le fichier a déjà le suffixe '%s', ignoré"
|
||||
|
||||
#: src/xz/suffix.c:393
|
||||
#: src/xz/suffix.c:235
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: Suffixe de nom de fichier invalide"
|
||||
|
||||
415
po/it.po
415
po/it.po
@@ -2,116 +2,80 @@
|
||||
# This file is in the public domain
|
||||
# Gruppo traduzione italiano di Ubuntu-it <gruppo-traduzione@ubuntu-it.org>, 2009, 2010
|
||||
# Lorenzo De Liso <blackz@ubuntu.com>, 2010.
|
||||
# Milo Casagrande <milo@ubuntu.com>, 2009, 2010, 2011, 2014.
|
||||
# Milo Casagrande <milo@ubuntu.com>, 2009, 2010, 2011, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-utils\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2014-09-14 21:56+0300\n"
|
||||
"PO-Revision-Date: 2014-10-20 13:16+0100\n"
|
||||
"Last-Translator: Milo Casagrande <milo@milo.name>\n"
|
||||
"POT-Creation-Date: 2012-05-29 13:50+0300\n"
|
||||
"PO-Revision-Date: 2012-05-31 09:57+0800\n"
|
||||
"Last-Translator: Milo Casagrande <milo@ubuntu.com>\n"
|
||||
"Language-Team: Italian <tp@lists.linux.it>\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-08-16 19:16+0000\n"
|
||||
"X-Generator: Poedit 1.6.10\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
|
||||
#: src/xz/args.c:63
|
||||
#, c-format
|
||||
msgid "%s: Invalid argument to --block-list"
|
||||
msgstr "%s: argomento non valido per --block-list"
|
||||
|
||||
#: src/xz/args.c:73
|
||||
#, c-format
|
||||
msgid "%s: Too many arguments to --block-list"
|
||||
msgstr "%s: troppi argomenti per --block-list"
|
||||
|
||||
#: src/xz/args.c:102
|
||||
msgid "0 can only be used as the last element in --block-list"
|
||||
msgstr "0 può essere usato solo come ultimo elemento in --block-list"
|
||||
|
||||
#: src/xz/args.c:406
|
||||
#: src/xz/args.c:333
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s: tipo di formato del file sconosciuto"
|
||||
|
||||
#: src/xz/args.c:429 src/xz/args.c:437
|
||||
#: src/xz/args.c:356 src/xz/args.c:364
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s: tipo di controllo integrità non supportato"
|
||||
|
||||
#: src/xz/args.c:473
|
||||
#: src/xz/args.c:382
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr "Solo un file può essere specificato con \"--files\" o \"--files0\"."
|
||||
|
||||
#: src/xz/args.c:541
|
||||
#: src/xz/args.c:445
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "La variabile d'ambiente %s contiene troppi argomenti"
|
||||
|
||||
#: src/xz/coder.c:110
|
||||
#: src/xz/coder.c:95
|
||||
msgid "Maximum number of filters is four"
|
||||
msgstr "Il numero massimo di filtri è quattro"
|
||||
|
||||
#: src/xz/coder.c:129
|
||||
#: src/xz/coder.c:108
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr ""
|
||||
"Il limite dell'uso della memoria è troppo basso per l'impostazione del "
|
||||
"filtro dato."
|
||||
|
||||
#: src/xz/coder.c:159
|
||||
#: src/xz/coder.c:129
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
msgstr "Non è consigliato usare un preset nella modalità raw."
|
||||
|
||||
#: src/xz/coder.c:161
|
||||
#: src/xz/coder.c:131
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr ""
|
||||
"Le opzioni esatte per i preset possono variare tra le versioni del software."
|
||||
|
||||
#: src/xz/coder.c:184
|
||||
#: src/xz/coder.c:157
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
msgstr "Il formato .lzma supporta solo il filtro LZMA1"
|
||||
|
||||
#: src/xz/coder.c:192
|
||||
#: src/xz/coder.c:165
|
||||
msgid "LZMA1 cannot be used with the .xz format"
|
||||
msgstr "LZMA1 non può essere usato con il formato .xz"
|
||||
|
||||
#: src/xz/coder.c:209
|
||||
msgid "The filter chain is incompatible with --flush-timeout"
|
||||
msgstr "La catena di filtri non è compatibile con --flush-timeout"
|
||||
|
||||
#: src/xz/coder.c:215
|
||||
msgid "Switching to single-threaded mode due to --flush-timeout"
|
||||
msgstr "Passaggio a modalità singolo thread poiché viene usato --flush-timeout"
|
||||
|
||||
#: src/xz/coder.c:234
|
||||
#, c-format
|
||||
msgid "Using up to %<PRIu32> threads."
|
||||
msgstr "Vengono usati circa %<PRIu32> thread."
|
||||
|
||||
#: src/xz/coder.c:247
|
||||
#: src/xz/coder.c:182
|
||||
msgid "Unsupported filter chain or filter options"
|
||||
msgstr "Catena di filtri od opzioni del filtro non supportata"
|
||||
|
||||
#: src/xz/coder.c:255
|
||||
#: src/xz/coder.c:190
|
||||
#, c-format
|
||||
msgid "Decompression will need %s MiB of memory."
|
||||
msgstr "L'estrazione necessita di %s MiB di memoria."
|
||||
|
||||
#: src/xz/coder.c:290
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Adjusted the number of threads from %s to %s to not exceed the memory usage "
|
||||
"limit of %s MiB"
|
||||
msgstr ""
|
||||
"Regolato il numero di thread da %s a %s per non eccedere il limite di "
|
||||
"utilizzo della memoria di %s MiB"
|
||||
|
||||
#: src/xz/coder.c:344
|
||||
#: src/xz/coder.c:247
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the "
|
||||
@@ -120,16 +84,6 @@ msgstr ""
|
||||
"Regolata la dimensione del dizionario LZMA%c da %s MiB a %s MiB per non "
|
||||
"superare il limite dell'uso della memoria di %s MiB"
|
||||
|
||||
#: src/xz/file_io.c:90
|
||||
#, c-format
|
||||
msgid "Error creating a pipe: %s"
|
||||
msgstr "Errore nel creare una pipe: %s"
|
||||
|
||||
#: src/xz/file_io.c:166
|
||||
#, c-format
|
||||
msgid "%s: poll() failed: %s"
|
||||
msgstr "%s: poll() non riuscita: %s"
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
#. if the source file still exists, and if it does, does its
|
||||
@@ -140,146 +94,119 @@ msgstr "%s: poll() non riuscita: %s"
|
||||
#. it is possible that the user has put a new file in place
|
||||
#. of the original file, and in that case it obviously
|
||||
#. shouldn't be removed.
|
||||
#: src/xz/file_io.c:236
|
||||
#: src/xz/file_io.c:137
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr "%s: sembra che il file sia stato spostato, non viene rimosso"
|
||||
|
||||
#: src/xz/file_io.c:243 src/xz/file_io.c:761
|
||||
#: src/xz/file_io.c:144 src/xz/file_io.c:589
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr "%s: impossibile rimuovere: %s"
|
||||
|
||||
#: src/xz/file_io.c:268
|
||||
#: src/xz/file_io.c:169
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr "%s: impossibile impostare il proprietario del file: %s"
|
||||
|
||||
#: src/xz/file_io.c:274
|
||||
#: src/xz/file_io.c:175
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr "%s: impossibile impostare il gruppo del file: %s"
|
||||
|
||||
#: src/xz/file_io.c:293
|
||||
#: src/xz/file_io.c:194
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s: impossibile impostare i permessi del file: %s"
|
||||
|
||||
#: src/xz/file_io.c:399
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard input: %s"
|
||||
msgstr ""
|
||||
"Errore nel recuperare le flag di stato del file dallo standard input: %s"
|
||||
|
||||
#: src/xz/file_io.c:408
|
||||
#, c-format
|
||||
msgid "Error setting O_NONBLOCK on standard input: %s"
|
||||
msgstr "Errore nell'impostare O_NONBLOCK sullo standard input: %s"
|
||||
|
||||
#: src/xz/file_io.c:460 src/xz/file_io.c:522
|
||||
#: src/xz/file_io.c:337 src/xz/file_io.c:420
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s: è un collegamento simbolico, viene saltato"
|
||||
|
||||
#: src/xz/file_io.c:551
|
||||
#: src/xz/file_io.c:455
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s: è una directory, viene saltata"
|
||||
|
||||
#: src/xz/file_io.c:557
|
||||
#: src/xz/file_io.c:461
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s: non è un file regolare, viene saltato"
|
||||
|
||||
#: src/xz/file_io.c:574
|
||||
#: src/xz/file_io.c:478
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr "%s: il file ha il bit setuid o setgid impostato, viene saltato"
|
||||
|
||||
#: src/xz/file_io.c:581
|
||||
#: src/xz/file_io.c:485
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr "%s: il file ha lo sticky bit impostato, viene saltato"
|
||||
|
||||
#: src/xz/file_io.c:588
|
||||
#: src/xz/file_io.c:492
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr "%s: il file di input ha più di un collegamento fisico, viene saltato"
|
||||
|
||||
#: src/xz/file_io.c:668
|
||||
#, c-format
|
||||
msgid "Error restoring the status flags to standard input: %s"
|
||||
msgstr "Errore nel ripristinare le flag di stato sullo standard input: %s"
|
||||
|
||||
#: src/xz/file_io.c:714
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard output: %s"
|
||||
msgstr ""
|
||||
"Errore nel recuperare le flag di stato del file dallo standard output: %s"
|
||||
|
||||
#: src/xz/file_io.c:723
|
||||
#, c-format
|
||||
msgid "Error setting O_NONBLOCK on standard output: %s"
|
||||
msgstr "Errore nell'impostare O_NONBLOCK sullo standard output: %s"
|
||||
|
||||
#: src/xz/file_io.c:896
|
||||
#: src/xz/file_io.c:713
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr "Errore nel ripristinare la flag O_APPEND sullo standard output: %s"
|
||||
|
||||
#: src/xz/file_io.c:908
|
||||
#: src/xz/file_io.c:725
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s: chiusura del file non riuscita: %s"
|
||||
|
||||
#: src/xz/file_io.c:944 src/xz/file_io.c:1170
|
||||
#: src/xz/file_io.c:761 src/xz/file_io.c:945
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr ""
|
||||
"%s: posizionamento non riuscito nel tentativo di creare un file sparso: %s"
|
||||
|
||||
#: src/xz/file_io.c:1039
|
||||
#: src/xz/file_io.c:820
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s: errore di lettura: %s"
|
||||
|
||||
#: src/xz/file_io.c:1059
|
||||
#: src/xz/file_io.c:843
|
||||
#, c-format
|
||||
msgid "%s: Error seeking the file: %s"
|
||||
msgstr "%s: errore nel cercare il file: %s"
|
||||
|
||||
#: src/xz/file_io.c:1069
|
||||
#: src/xz/file_io.c:853
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr "%s: fine del file inaspettata"
|
||||
|
||||
#: src/xz/file_io.c:1128
|
||||
#: src/xz/file_io.c:903
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s: errore di scrittura: %s"
|
||||
|
||||
#: src/xz/hardware.c:107
|
||||
#: src/xz/hardware.c:100
|
||||
msgid "Disabled"
|
||||
msgstr "Disabilitato"
|
||||
|
||||
#. TRANSLATORS: Test with "xz --info-memory" to see if
|
||||
#. the alignment looks nice.
|
||||
#: src/xz/hardware.c:126
|
||||
#: src/xz/hardware.c:119
|
||||
msgid "Total amount of physical memory (RAM): "
|
||||
msgstr "Quantità totale di memoria fisica (RAM): "
|
||||
|
||||
#: src/xz/hardware.c:128
|
||||
#: src/xz/hardware.c:121
|
||||
msgid "Memory usage limit for compression: "
|
||||
msgstr "Limite utilizzo memoria per la compressione: "
|
||||
|
||||
#: src/xz/hardware.c:130
|
||||
#: src/xz/hardware.c:123
|
||||
msgid "Memory usage limit for decompression: "
|
||||
msgstr "Limite utilizzo memoria per l'estrazione: "
|
||||
|
||||
#. TRANSLATORS: Indicates that there is no integrity check.
|
||||
#. This string is used in tables, so the width must not
|
||||
#. exceed ten columns with a fixed-width font.
|
||||
#: src/xz/list.c:65
|
||||
#: src/xz/list.c:62
|
||||
msgid "None"
|
||||
msgstr "Nessuno"
|
||||
|
||||
@@ -288,60 +215,60 @@ msgstr "Nessuno"
|
||||
#. strings are used in tables, so the width must not exceed ten
|
||||
#. columns with a fixed-width font. It's OK to omit the dash if
|
||||
#. you need space for one extra letter, but don't use spaces.
|
||||
#: src/xz/list.c:72
|
||||
#: src/xz/list.c:69
|
||||
msgid "Unknown-2"
|
||||
msgstr "Sconosc2"
|
||||
|
||||
#: src/xz/list.c:73
|
||||
#: src/xz/list.c:70
|
||||
msgid "Unknown-3"
|
||||
msgstr "Sconosc3"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
#: src/xz/list.c:72
|
||||
msgid "Unknown-5"
|
||||
msgstr "Sconosc5"
|
||||
|
||||
#: src/xz/list.c:76
|
||||
#: src/xz/list.c:73
|
||||
msgid "Unknown-6"
|
||||
msgstr "Sconosc6"
|
||||
|
||||
#: src/xz/list.c:77
|
||||
#: src/xz/list.c:74
|
||||
msgid "Unknown-7"
|
||||
msgstr "Sconosc7"
|
||||
|
||||
#: src/xz/list.c:78
|
||||
#: src/xz/list.c:75
|
||||
msgid "Unknown-8"
|
||||
msgstr "Sconosc8"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
#: src/xz/list.c:76
|
||||
msgid "Unknown-9"
|
||||
msgstr "Sconosc9"
|
||||
|
||||
#: src/xz/list.c:81
|
||||
#: src/xz/list.c:78
|
||||
msgid "Unknown-11"
|
||||
msgstr "Sconosc11"
|
||||
|
||||
#: src/xz/list.c:82
|
||||
#: src/xz/list.c:79
|
||||
msgid "Unknown-12"
|
||||
msgstr "Sconosc12"
|
||||
|
||||
#: src/xz/list.c:83
|
||||
#: src/xz/list.c:80
|
||||
msgid "Unknown-13"
|
||||
msgstr "Sconosc13"
|
||||
|
||||
#: src/xz/list.c:84
|
||||
#: src/xz/list.c:81
|
||||
msgid "Unknown-14"
|
||||
msgstr "Sconosc14"
|
||||
|
||||
#: src/xz/list.c:85
|
||||
#: src/xz/list.c:82
|
||||
msgid "Unknown-15"
|
||||
msgstr "Sconosc15"
|
||||
|
||||
#: src/xz/list.c:153
|
||||
#: src/xz/list.c:126
|
||||
#, c-format
|
||||
msgid "%s: File is empty"
|
||||
msgstr "%s: il file è vuoto"
|
||||
|
||||
#: src/xz/list.c:158
|
||||
#: src/xz/list.c:131
|
||||
#, c-format
|
||||
msgid "%s: Too small to be a valid .xz file"
|
||||
msgstr "%s: troppo piccolo per essere un file .xz valido"
|
||||
@@ -350,41 +277,41 @@ msgstr "%s: troppo piccolo per essere un file .xz valido"
|
||||
#. to Ratio, the columns are right aligned. Check and Filename
|
||||
#. are left aligned. If you need longer words, it's OK to
|
||||
#. use two lines here. Test with "xz -l foo.xz".
|
||||
#: src/xz/list.c:671
|
||||
#: src/xz/list.c:603
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr " Strm Blocc. Compresso Estratto Rapp. Contr Nome file"
|
||||
|
||||
#: src/xz/list.c:711
|
||||
#: src/xz/list.c:643
|
||||
#, c-format
|
||||
msgid " Streams: %s\n"
|
||||
msgstr " Stream: %s\n"
|
||||
|
||||
#: src/xz/list.c:713
|
||||
#: src/xz/list.c:645
|
||||
#, c-format
|
||||
msgid " Blocks: %s\n"
|
||||
msgstr " Blocchi: %s\n"
|
||||
|
||||
#: src/xz/list.c:715
|
||||
#: src/xz/list.c:647
|
||||
#, c-format
|
||||
msgid " Compressed size: %s\n"
|
||||
msgstr " Dim. compresso: %s\n"
|
||||
|
||||
#: src/xz/list.c:718
|
||||
#: src/xz/list.c:650
|
||||
#, c-format
|
||||
msgid " Uncompressed size: %s\n"
|
||||
msgstr " Dim. estratto: %s\n"
|
||||
|
||||
#: src/xz/list.c:721
|
||||
#: src/xz/list.c:653
|
||||
#, c-format
|
||||
msgid " Ratio: %s\n"
|
||||
msgstr " Rapporto: %s\n"
|
||||
|
||||
#: src/xz/list.c:723
|
||||
#: src/xz/list.c:655
|
||||
#, c-format
|
||||
msgid " Check: %s\n"
|
||||
msgstr " Controllo: %s\n"
|
||||
|
||||
#: src/xz/list.c:724
|
||||
#: src/xz/list.c:656
|
||||
#, c-format
|
||||
msgid " Stream padding: %s\n"
|
||||
msgstr " Padding dello stream: %s\n"
|
||||
@@ -392,7 +319,7 @@ msgstr " Padding dello stream: %s\n"
|
||||
#. TRANSLATORS: The second line is column headings. All except
|
||||
#. Check are right aligned; Check is left aligned. Test with
|
||||
#. "xz -lv foo.xz".
|
||||
#: src/xz/list.c:752
|
||||
#: src/xz/list.c:684
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize "
|
||||
@@ -404,7 +331,7 @@ msgstr ""
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
#: src/xz/list.c:807
|
||||
#: src/xz/list.c:739
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
@@ -422,57 +349,52 @@ msgstr ""
|
||||
#. are right aligned. %*s is replaced with 0-120
|
||||
#. spaces to make the CheckVal column wide enough.
|
||||
#. Test with "xz -lvv foo.xz".
|
||||
#: src/xz/list.c:819
|
||||
#: src/xz/list.c:751
|
||||
#, c-format
|
||||
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
msgstr " Val.cont %*s Header Flag Dim.compr. Uso mem. Filtri"
|
||||
|
||||
#: src/xz/list.c:897 src/xz/list.c:1072
|
||||
#: src/xz/list.c:829 src/xz/list.c:998
|
||||
#, c-format
|
||||
msgid " Memory needed: %s MiB\n"
|
||||
msgstr " Memoria necessaria: %s MiB\n"
|
||||
|
||||
#: src/xz/list.c:899 src/xz/list.c:1074
|
||||
#: src/xz/list.c:831 src/xz/list.c:1000
|
||||
#, c-format
|
||||
msgid " Sizes in headers: %s\n"
|
||||
msgstr " Dim. negli header: %s\n"
|
||||
|
||||
#: src/xz/list.c:900 src/xz/list.c:1075
|
||||
#: src/xz/list.c:832 src/xz/list.c:1001
|
||||
msgid "Yes"
|
||||
msgstr "Sì"
|
||||
|
||||
#: src/xz/list.c:900 src/xz/list.c:1075
|
||||
#: src/xz/list.c:832 src/xz/list.c:1001
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
#: src/xz/list.c:901 src/xz/list.c:1076
|
||||
#, c-format
|
||||
msgid " Minimum XZ Utils version: %s\n"
|
||||
msgstr " Versione \"XZ Utils\" minima: %s\n"
|
||||
|
||||
#. TRANSLATORS: %s is an integer. Only the plural form of this
|
||||
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
|
||||
#: src/xz/list.c:1051
|
||||
#: src/xz/list.c:977
|
||||
#, c-format
|
||||
msgid "%s file\n"
|
||||
msgid_plural "%s files\n"
|
||||
msgstr[0] "%s file\n"
|
||||
msgstr[1] "%s file\n"
|
||||
|
||||
#: src/xz/list.c:1064
|
||||
#: src/xz/list.c:990
|
||||
msgid "Totals:"
|
||||
msgstr "Totali:"
|
||||
|
||||
#: src/xz/list.c:1065
|
||||
#: src/xz/list.c:991
|
||||
#, c-format
|
||||
msgid " Number of files: %s\n"
|
||||
msgstr " Numero di file: %s\n"
|
||||
|
||||
#: src/xz/list.c:1140
|
||||
#: src/xz/list.c:1063
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr "--list funziona solamente con file .xz (--format=xz o --format=auto)"
|
||||
|
||||
#: src/xz/list.c:1146
|
||||
#: src/xz/list.c:1069
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr "--list non è in grado di leggere dallo standard input"
|
||||
|
||||
@@ -511,71 +433,71 @@ msgstr ""
|
||||
#. of the line in messages. Usually it becomes "xz: ".
|
||||
#. This is a translatable string because French needs
|
||||
#. a space before a colon.
|
||||
#: src/xz/message.c:713
|
||||
#: src/xz/message.c:733
|
||||
#, c-format
|
||||
msgid "%s: "
|
||||
msgstr "%s: "
|
||||
|
||||
#: src/xz/message.c:776 src/xz/message.c:826
|
||||
#: src/xz/message.c:796 src/xz/message.c:846
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Errore interno (bug)"
|
||||
|
||||
#: src/xz/message.c:783
|
||||
#: src/xz/message.c:803
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Impossibile stabilire i gestori dei segnali"
|
||||
|
||||
#: src/xz/message.c:792
|
||||
#: src/xz/message.c:812
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
"Nessun controllo d'integrità; l'integrità del file non viene verificata"
|
||||
|
||||
#: src/xz/message.c:795
|
||||
#: src/xz/message.c:815
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
"Tipo di controllo di integrità non supportato; l'integrità del file non "
|
||||
"viene verificata"
|
||||
|
||||
#: src/xz/message.c:802
|
||||
#: src/xz/message.c:822
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Limite di utilizzo della memoria raggiunto"
|
||||
|
||||
#: src/xz/message.c:805
|
||||
#: src/xz/message.c:825
|
||||
msgid "File format not recognized"
|
||||
msgstr "Formato di file non riconosciuto"
|
||||
|
||||
#: src/xz/message.c:808
|
||||
#: src/xz/message.c:828
|
||||
msgid "Unsupported options"
|
||||
msgstr "Opzioni non supportate"
|
||||
|
||||
#: src/xz/message.c:811
|
||||
#: src/xz/message.c:831
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "I dati compressi sono danneggiati"
|
||||
|
||||
#: src/xz/message.c:814
|
||||
#: src/xz/message.c:834
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Fine dell'input non attesa"
|
||||
|
||||
#: src/xz/message.c:847
|
||||
#: src/xz/message.c:867
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limiter is disabled."
|
||||
msgstr "%s MiB di memoria sono richiesti. Il limite è disabilitato."
|
||||
msgstr "%s MiB di memoria sono richiesti. Alcun limite impostato."
|
||||
|
||||
#: src/xz/message.c:875
|
||||
#: src/xz/message.c:895
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "%s MiB di memoria sono richiesti. Il limite è %s."
|
||||
|
||||
#: src/xz/message.c:1042
|
||||
#: src/xz/message.c:1062
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: catena di filtri: %s\n"
|
||||
|
||||
#: src/xz/message.c:1052
|
||||
#: src/xz/message.c:1072
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Provare \"%s --help\" per maggiori informazioni."
|
||||
|
||||
#: src/xz/message.c:1078
|
||||
#: src/xz/message.c:1098
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
@@ -586,18 +508,18 @@ msgstr ""
|
||||
"Comprime o estrae i FILE nel formato .xz.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:1085
|
||||
#: src/xz/message.c:1105
|
||||
msgid ""
|
||||
"Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Gli argomenti obbligatori per le opzioni lunghe lo sono anche per quelle "
|
||||
"brevi.\n"
|
||||
|
||||
#: src/xz/message.c:1089
|
||||
#: src/xz/message.c:1109
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " Modalità di operazione:\n"
|
||||
|
||||
#: src/xz/message.c:1092
|
||||
#: src/xz/message.c:1112
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
@@ -609,7 +531,7 @@ msgstr ""
|
||||
" -t, --test Verifica l'integrità dei file compressi\n"
|
||||
" -l, --list Elenca informazioni sui file .xz"
|
||||
|
||||
#: src/xz/message.c:1098
|
||||
#: src/xz/message.c:1118
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
@@ -617,7 +539,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Modificatori di operazioni:\n"
|
||||
|
||||
#: src/xz/message.c:1101
|
||||
#: src/xz/message.c:1121
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
@@ -630,15 +552,7 @@ msgstr ""
|
||||
" -c, --stdout Scrive sullo standard output e non elimina i file di "
|
||||
"input"
|
||||
|
||||
#: src/xz/message.c:1107
|
||||
msgid ""
|
||||
" --single-stream decompress only the first stream, and silently\n"
|
||||
" ignore possible remaining input data"
|
||||
msgstr ""
|
||||
" --single-stream Decomprime solamente il primo stream e ignora\n"
|
||||
" silenziosamente i restanti dati di input"
|
||||
|
||||
#: src/xz/message.c:1110
|
||||
#: src/xz/message.c:1127
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
@@ -658,7 +572,7 @@ msgstr ""
|
||||
" di newline\n"
|
||||
" --files0=[FILE] Come --files ma usa il carattere null come terminatore"
|
||||
|
||||
#: src/xz/message.c:1119
|
||||
#: src/xz/message.c:1135
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
@@ -666,7 +580,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Formato file di base e opzioni di compressione:\n"
|
||||
|
||||
#: src/xz/message.c:1121
|
||||
#: src/xz/message.c:1137
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
@@ -681,13 +595,7 @@ msgstr ""
|
||||
"attenzione),\n"
|
||||
" \"crc32\", \"crc64\" (predefinito) o \"sha256\""
|
||||
|
||||
#: src/xz/message.c:1126
|
||||
msgid ""
|
||||
" --ignore-check don't verify the integrity check when decompressing"
|
||||
msgstr ""
|
||||
" --ignore-check Non verifica il codice di integrità quando decomprime"
|
||||
|
||||
#: src/xz/message.c:1130
|
||||
#: src/xz/message.c:1144
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor "
|
||||
"*and*\n"
|
||||
@@ -700,7 +608,7 @@ msgstr ""
|
||||
"prima\n"
|
||||
" di usare 7-9"
|
||||
|
||||
#: src/xz/message.c:1134
|
||||
#: src/xz/message.c:1148
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU "
|
||||
"time;\n"
|
||||
@@ -711,59 +619,7 @@ msgstr ""
|
||||
"di\n"
|
||||
" memoria in fase di estrazione"
|
||||
|
||||
#: src/xz/message.c:1138
|
||||
msgid ""
|
||||
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
|
||||
" to use as many threads as there are processor cores"
|
||||
msgstr ""
|
||||
" -T, --threads=NUM Usa al massimo NUM thread: il valore predefinito è 1,\n"
|
||||
" impostare a 0 per usare tanti thread quanti core la "
|
||||
"CPU\n"
|
||||
" ha a disposizione"
|
||||
|
||||
#: src/xz/message.c:1143
|
||||
msgid ""
|
||||
" --block-size=SIZE\n"
|
||||
" start a new .xz block after every SIZE bytes of "
|
||||
"input;\n"
|
||||
" use this to set the block size for threaded compression"
|
||||
msgstr ""
|
||||
" --block-size=DIM\n"
|
||||
" Avvia un nuovo blocco .xz dopo ogni DIM byte di "
|
||||
"input:\n"
|
||||
" usare per impostare la dimensione del blocco durante "
|
||||
"la\n"
|
||||
" compressione con thread"
|
||||
|
||||
#: src/xz/message.c:1147
|
||||
msgid ""
|
||||
" --block-list=SIZES\n"
|
||||
" start a new .xz block after the given comma-separated\n"
|
||||
" intervals of uncompressed data"
|
||||
msgstr ""
|
||||
" --block-list=DIM\n"
|
||||
" Avvia un nuovo blocco .xz dopo gli intervalli, "
|
||||
"sperati\n"
|
||||
" da virgole, di dati non compressi"
|
||||
|
||||
#: src/xz/message.c:1151
|
||||
msgid ""
|
||||
" --flush-timeout=TIMEOUT\n"
|
||||
" when compressing, if more than TIMEOUT milliseconds "
|
||||
"has\n"
|
||||
" passed since the previous flush and reading more "
|
||||
"input\n"
|
||||
" would block, all pending data is flushed out"
|
||||
msgstr ""
|
||||
" --flush-timeout=TIMEOUT\n"
|
||||
" Durante la compressione, se sono passati più di "
|
||||
"TIMEOUT\n"
|
||||
" millisecondi dal flush precedente e la lettura di\n"
|
||||
" ulteriore input risulterebbe bloccata, viene eseguito "
|
||||
"il\n"
|
||||
" flush di tutti i dati pendenti"
|
||||
|
||||
#: src/xz/message.c:1157
|
||||
#: src/xz/message.c:1153
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
@@ -781,7 +637,7 @@ msgstr ""
|
||||
"byte,\n"
|
||||
" % della memoria RAM oppure 0 per il valore predefinito"
|
||||
|
||||
#: src/xz/message.c:1164
|
||||
#: src/xz/message.c:1160
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage "
|
||||
"limit,\n"
|
||||
@@ -793,7 +649,7 @@ msgstr ""
|
||||
" utilizzo della memoria, lancia un errore invece di\n"
|
||||
" utilizzare valori più piccoli"
|
||||
|
||||
#: src/xz/message.c:1170
|
||||
#: src/xz/message.c:1166
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
@@ -802,7 +658,7 @@ msgstr ""
|
||||
" Catena di filtri personalizzati per la compressione (alternative per\n"
|
||||
" l'utilizzo di preset):"
|
||||
|
||||
#: src/xz/message.c:1179
|
||||
#: src/xz/message.c:1175
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero "
|
||||
@@ -826,8 +682,8 @@ msgstr ""
|
||||
"zero\n"
|
||||
" --lzma2[=OPZ] o più delle seguenti opzioni (valori validi; "
|
||||
"predefinito):\n"
|
||||
" preset=NUM Reimposta le opzioni al preset NUM "
|
||||
"(0-9[e])\n"
|
||||
" preset=NUM Reimposta le opzioni al preset NUM (0-9"
|
||||
"[e])\n"
|
||||
" dict=NUM Dimensione del dizionario\n"
|
||||
" (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM Numero di bit letterali di contesto (0-4; "
|
||||
@@ -845,7 +701,7 @@ msgstr ""
|
||||
"0=automatica\n"
|
||||
" (predefinito)"
|
||||
|
||||
#: src/xz/message.c:1194
|
||||
#: src/xz/message.c:1190
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@@ -868,7 +724,7 @@ msgstr ""
|
||||
" start=NUM Offset iniziale per le conversioni\n"
|
||||
" (predefinito=0)"
|
||||
|
||||
#: src/xz/message.c:1206
|
||||
#: src/xz/message.c:1202
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
@@ -880,7 +736,7 @@ msgstr ""
|
||||
" dist=NUM Distanza tra byte sottratti\n"
|
||||
" gli uni dagli altri (1-256; 1)"
|
||||
|
||||
#: src/xz/message.c:1214
|
||||
#: src/xz/message.c:1210
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
@@ -888,7 +744,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Altre opzioni:\n"
|
||||
|
||||
#: src/xz/message.c:1217
|
||||
#: src/xz/message.c:1213
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors "
|
||||
"too\n"
|
||||
@@ -901,16 +757,16 @@ msgstr ""
|
||||
"ancora\n"
|
||||
" più prolisso"
|
||||
|
||||
#: src/xz/message.c:1222
|
||||
#: src/xz/message.c:1218
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn Gli avvisi non influenzano lo stato d'uscita"
|
||||
|
||||
#: src/xz/message.c:1224
|
||||
#: src/xz/message.c:1220
|
||||
msgid ""
|
||||
" --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr " --robot Usa messaggi analizzabili (utile per gli script)"
|
||||
|
||||
#: src/xz/message.c:1227
|
||||
#: src/xz/message.c:1223
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently "
|
||||
"active\n"
|
||||
@@ -920,7 +776,7 @@ msgstr ""
|
||||
"attuale\n"
|
||||
" attivo di utilizzo della memore ed esce"
|
||||
|
||||
#: src/xz/message.c:1230
|
||||
#: src/xz/message.c:1226
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
@@ -928,7 +784,7 @@ msgstr ""
|
||||
" -h, --help Stampa l'aiuto breve (elenca solo le opzioni di base)\n"
|
||||
" -H, --long-help Stampa questo lungo aiuto ed esce"
|
||||
|
||||
#: src/xz/message.c:1234
|
||||
#: src/xz/message.c:1230
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
@@ -936,11 +792,11 @@ msgstr ""
|
||||
" -h, --help Stampa questo breve aiuto ed esce\n"
|
||||
" -H, --long-help Stampa l'aiuto lungo (elenca anche le opzioni avanzate)"
|
||||
|
||||
#: src/xz/message.c:1239
|
||||
#: src/xz/message.c:1235
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version Stampa il numero della versione ed esce"
|
||||
|
||||
#: src/xz/message.c:1241
|
||||
#: src/xz/message.c:1237
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
@@ -952,23 +808,18 @@ msgstr ""
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1247
|
||||
#: src/xz/message.c:1243
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
"Segnalare i bug a <%s> (in inglese o finlandese).\n"
|
||||
"Segnalare i bug di traduzione a <tp@lists.linux.it>.\n"
|
||||
|
||||
#: src/xz/message.c:1249
|
||||
#: src/xz/message.c:1245
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "Sito web di %s: <%s>\n"
|
||||
|
||||
#: src/xz/message.c:1253
|
||||
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
|
||||
msgstr ""
|
||||
"Questa è una versione di sviluppo non adatta per utilizzi in produzione."
|
||||
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
@@ -1001,7 +852,7 @@ msgstr ""
|
||||
"Lo strumento per cercare corrispondenze selezionato richiede almeno nice="
|
||||
"%<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:133 src/xz/suffix.c:258
|
||||
#: src/xz/suffix.c:101 src/xz/suffix.c:194
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
@@ -1009,52 +860,52 @@ msgstr ""
|
||||
"%s: con --format=raw, --suffix=.SUF è richiesto a meno che non si scriva "
|
||||
"sullo stdout"
|
||||
|
||||
#: src/xz/suffix.c:164
|
||||
#: src/xz/suffix.c:121
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s: il nome del file ha un suffisso sconosciuto, viene saltato"
|
||||
|
||||
#: src/xz/suffix.c:185
|
||||
#: src/xz/suffix.c:175 src/xz/suffix.c:184
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s: il file ha già il suffisso \"%s\", viene saltato"
|
||||
|
||||
#: src/xz/suffix.c:393
|
||||
#: src/xz/suffix.c:235
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: suffisso del nome del file non valido"
|
||||
|
||||
#: src/xz/util.c:71
|
||||
#: src/xz/util.c:61
|
||||
#, c-format
|
||||
msgid "%s: Value is not a non-negative decimal integer"
|
||||
msgstr "%s: il valore non è un numero intero decimale non-negativo"
|
||||
|
||||
#: src/xz/util.c:113
|
||||
#: src/xz/util.c:103
|
||||
#, c-format
|
||||
msgid "%s: Invalid multiplier suffix"
|
||||
msgstr "%s: suffisso del moltiplicatore non valido"
|
||||
|
||||
#: src/xz/util.c:115
|
||||
#: src/xz/util.c:105
|
||||
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
msgstr ""
|
||||
"I suffissi validi sono \"KiB\" (2^10), \"MiB\" (2^20), e \"GiB\" (2^30)."
|
||||
|
||||
#: src/xz/util.c:132
|
||||
#: src/xz/util.c:122
|
||||
#, c-format
|
||||
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr ""
|
||||
"Il valore dell'opzione \"%s\" deve essere nell'intervallo [%<PRIu64>, "
|
||||
"%<PRIu64>]"
|
||||
|
||||
#: src/xz/util.c:257
|
||||
#: src/xz/util.c:247
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr "Nome file vuoto, viene saltato"
|
||||
|
||||
#: src/xz/util.c:271
|
||||
#: src/xz/util.c:261
|
||||
msgid "Compressed data cannot be read from a terminal"
|
||||
msgstr "I dati compressi non possono essere letti da un terminale"
|
||||
|
||||
#: src/xz/util.c:284
|
||||
#: src/xz/util.c:274
|
||||
msgid "Compressed data cannot be written to a terminal"
|
||||
msgstr "I dati compressi non possono essere scritti ad un terminale"
|
||||
|
||||
|
||||
383
po/pl.po
383
po/pl.po
@@ -1,13 +1,13 @@
|
||||
# Polish translation for xz.
|
||||
# This file is in the public domain.
|
||||
# Jakub Bogusz <qboosh@pld-linux.org>, 2011-2014.
|
||||
# Jakub Bogusz <qboosh@pld-linux.org>, 2011-2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz 5.1.4\n"
|
||||
"Project-Id-Version: xz 5.0.2\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2014-09-14 21:56+0300\n"
|
||||
"PO-Revision-Date: 2014-10-15 20:53+0200\n"
|
||||
"POT-Creation-Date: 2012-05-29 13:50+0300\n"
|
||||
"PO-Revision-Date: 2012-05-29 18:15+0200\n"
|
||||
"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
|
||||
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
|
||||
"Language: pl\n"
|
||||
@@ -16,105 +16,63 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
|
||||
#: src/xz/args.c:63
|
||||
#, c-format
|
||||
msgid "%s: Invalid argument to --block-list"
|
||||
msgstr "%s: Błędny argument dla --block-list"
|
||||
|
||||
#: src/xz/args.c:73
|
||||
#, c-format
|
||||
msgid "%s: Too many arguments to --block-list"
|
||||
msgstr "%s: Zbyt dużo argumentów dla --block-list"
|
||||
|
||||
#: src/xz/args.c:102
|
||||
msgid "0 can only be used as the last element in --block-list"
|
||||
msgstr "0 w --block-list może być użyte wyłącznie jako ostatni element"
|
||||
|
||||
#: src/xz/args.c:406
|
||||
#: src/xz/args.c:333
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s: Nieznany typ formatu pliku"
|
||||
|
||||
#: src/xz/args.c:429 src/xz/args.c:437
|
||||
#: src/xz/args.c:356 src/xz/args.c:364
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s: Nieobsługiwany typ kontroli spójności"
|
||||
|
||||
#: src/xz/args.c:473
|
||||
#: src/xz/args.c:382
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr "Wraz z opcją `--files' lub `--files0' można podać tylko jeden plik."
|
||||
|
||||
#: src/xz/args.c:541
|
||||
#: src/xz/args.c:445
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "Zmienna środowiskowa %s zawiera zbyt dużo argumentów"
|
||||
|
||||
#: src/xz/coder.c:110
|
||||
#: src/xz/coder.c:95
|
||||
msgid "Maximum number of filters is four"
|
||||
msgstr "Maksymalna liczba filtrów to cztery"
|
||||
|
||||
#: src/xz/coder.c:129
|
||||
#: src/xz/coder.c:108
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr "Limit użycia pamięci jest zbyt mały dla podanej konfiguracji filtra."
|
||||
|
||||
#: src/xz/coder.c:159
|
||||
#: src/xz/coder.c:129
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
msgstr "Użycie ustawień predefiniowanych w trybie surowym jest odradzane."
|
||||
|
||||
#: src/xz/coder.c:161
|
||||
#: src/xz/coder.c:131
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr "Dokładne opcje ustawień predefiniowanych mogą różnić się między wersjami oprogramowania."
|
||||
|
||||
#: src/xz/coder.c:184
|
||||
#: src/xz/coder.c:157
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
msgstr "Format .lzma obsługuje tylko filtr LZMA1"
|
||||
|
||||
#: src/xz/coder.c:192
|
||||
#: src/xz/coder.c:165
|
||||
msgid "LZMA1 cannot be used with the .xz format"
|
||||
msgstr "LZMA1 nie może być używany z formatem .xz"
|
||||
|
||||
#: src/xz/coder.c:209
|
||||
msgid "The filter chain is incompatible with --flush-timeout"
|
||||
msgstr "Łańcuch filtrów jest niezgodny z --flush-timeout"
|
||||
|
||||
#: src/xz/coder.c:215
|
||||
msgid "Switching to single-threaded mode due to --flush-timeout"
|
||||
msgstr "Przełączanie w tryb jednowątkowy z powodu --flush-timeout"
|
||||
|
||||
#: src/xz/coder.c:234
|
||||
#, c-format
|
||||
msgid "Using up to %<PRIu32> threads."
|
||||
msgstr "Maksymalna liczba używanych wątków: %<PRIu32>."
|
||||
|
||||
#: src/xz/coder.c:247
|
||||
#: src/xz/coder.c:182
|
||||
msgid "Unsupported filter chain or filter options"
|
||||
msgstr "Nieobsługiwany łańcuch filtrów lub opcje filtra"
|
||||
|
||||
#: src/xz/coder.c:255
|
||||
#: src/xz/coder.c:190
|
||||
#, c-format
|
||||
msgid "Decompression will need %s MiB of memory."
|
||||
msgstr "Dekompresja będzie wymagała %s MiB pamięci."
|
||||
|
||||
#: src/xz/coder.c:290
|
||||
#, c-format
|
||||
msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Skorygowano liczbę wątków z %s do %s, aby nie przekroczyć limitu użycia pamięci %s MiB"
|
||||
|
||||
#: src/xz/coder.c:344
|
||||
#: src/xz/coder.c:247
|
||||
#, c-format
|
||||
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Skorygowano rozmiar słownika LZMA%c z %s MiB do %s MiB aby nie przekroczyć limitu użycia pamięci %s MiB"
|
||||
|
||||
#: src/xz/file_io.c:90
|
||||
#, c-format
|
||||
msgid "Error creating a pipe: %s"
|
||||
msgstr "Błąd tworzenia potoku: %s"
|
||||
|
||||
#: src/xz/file_io.c:166
|
||||
#, c-format
|
||||
msgid "%s: poll() failed: %s"
|
||||
msgstr "%s: poll() nie powiodło się: %s"
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
#. if the source file still exists, and if it does, does its
|
||||
@@ -125,143 +83,118 @@ msgstr "%s: poll() nie powiodło się: %s"
|
||||
#. it is possible that the user has put a new file in place
|
||||
#. of the original file, and in that case it obviously
|
||||
#. shouldn't be removed.
|
||||
#: src/xz/file_io.c:236
|
||||
#: src/xz/file_io.c:137
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr "%s: Plik wygląda na przeniesiony, nie zostanie usunięty"
|
||||
|
||||
#: src/xz/file_io.c:243 src/xz/file_io.c:761
|
||||
#: src/xz/file_io.c:144 src/xz/file_io.c:589
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr "%s: Nie można usunąć: %s"
|
||||
|
||||
#: src/xz/file_io.c:268
|
||||
#: src/xz/file_io.c:169
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr "%s: Nie można ustawić właściciela pliku: %s"
|
||||
|
||||
#: src/xz/file_io.c:274
|
||||
#: src/xz/file_io.c:175
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr "%s: Nie można ustawić grupy pliku: %s"
|
||||
|
||||
#: src/xz/file_io.c:293
|
||||
#: src/xz/file_io.c:194
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s: Nie można ustawić uprawnień pliku: %s"
|
||||
|
||||
#: src/xz/file_io.c:399
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard input: %s"
|
||||
msgstr "Błąd podczas pobierania flag stanu pliku ze standardowego wejścia: %s"
|
||||
|
||||
#: src/xz/file_io.c:408
|
||||
#, c-format
|
||||
msgid "Error setting O_NONBLOCK on standard input: %s"
|
||||
msgstr "Błąd podczas ustawiania O_NONBLOCK dla standardowego wejścia: %s"
|
||||
|
||||
#: src/xz/file_io.c:460 src/xz/file_io.c:522
|
||||
#: src/xz/file_io.c:337 src/xz/file_io.c:420
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s: Jest dowiązaniem symbolicznym, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:551
|
||||
#: src/xz/file_io.c:455
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s: Jest katalogiem, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:557
|
||||
#: src/xz/file_io.c:461
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s: Nie jest zwykłym plikiem, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:574
|
||||
#: src/xz/file_io.c:478
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr "%s: Plik ma ustawiony bit setuid lub setgid, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:581
|
||||
#: src/xz/file_io.c:485
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr "%s: Plik ma ustawiony bit sticky, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:588
|
||||
#: src/xz/file_io.c:492
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr "%s: Plik wejściowy ma więcej niż jedno dowiązanie zwykłe, pominięto"
|
||||
|
||||
#: src/xz/file_io.c:668
|
||||
#, c-format
|
||||
msgid "Error restoring the status flags to standard input: %s"
|
||||
msgstr "Błąd podczas odtwarzania flag stanu dla standardowego wejścia: %s"
|
||||
|
||||
#: src/xz/file_io.c:714
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard output: %s"
|
||||
msgstr "Błąd podczas pobierania flag stanu pliku ze standardowego wyjścia: %s"
|
||||
|
||||
#: src/xz/file_io.c:723
|
||||
#, c-format
|
||||
msgid "Error setting O_NONBLOCK on standard output: %s"
|
||||
msgstr "Błąd podczas ustawiania O_NONBLOCK dla standardowego wyjścia: %s"
|
||||
|
||||
#: src/xz/file_io.c:896
|
||||
#: src/xz/file_io.c:713
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr "Błąd podczas odtwarzania flagi O_APPEND dla standardowego wyjścia: %s"
|
||||
|
||||
#: src/xz/file_io.c:908
|
||||
#: src/xz/file_io.c:725
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s: Zamknięcie pliku nie powiodło się: %s"
|
||||
|
||||
#: src/xz/file_io.c:944 src/xz/file_io.c:1170
|
||||
#: src/xz/file_io.c:761 src/xz/file_io.c:945
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr "%s: Zmiana pozycji nie powiodła się podczas próby utworzenia pliku rzadkiego: %s"
|
||||
|
||||
#: src/xz/file_io.c:1039
|
||||
#: src/xz/file_io.c:820
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s: Błąd odczytu: %s"
|
||||
|
||||
#: src/xz/file_io.c:1059
|
||||
#: src/xz/file_io.c:843
|
||||
#, c-format
|
||||
msgid "%s: Error seeking the file: %s"
|
||||
msgstr "%s: Błąd podczas zmiany pozycji w pliku: %s"
|
||||
|
||||
#: src/xz/file_io.c:1069
|
||||
#: src/xz/file_io.c:853
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr "%s: Nieoczekiwany koniec pliku"
|
||||
|
||||
#: src/xz/file_io.c:1128
|
||||
#: src/xz/file_io.c:903
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s: Błąd zapisu: %s"
|
||||
|
||||
#: src/xz/hardware.c:107
|
||||
#: src/xz/hardware.c:100
|
||||
msgid "Disabled"
|
||||
msgstr "Wyłączony"
|
||||
|
||||
#. TRANSLATORS: Test with "xz --info-memory" to see if
|
||||
#. the alignment looks nice.
|
||||
#: src/xz/hardware.c:126
|
||||
#: src/xz/hardware.c:119
|
||||
msgid "Total amount of physical memory (RAM): "
|
||||
msgstr "Całkowita ilość pamięci fizycznej (RAM): "
|
||||
|
||||
#: src/xz/hardware.c:128
|
||||
#: src/xz/hardware.c:121
|
||||
msgid "Memory usage limit for compression: "
|
||||
msgstr "Limit użycia pamięci dla kompresji: "
|
||||
|
||||
#: src/xz/hardware.c:130
|
||||
#: src/xz/hardware.c:123
|
||||
msgid "Memory usage limit for decompression: "
|
||||
msgstr "Limit użycia pamięci dla dekompresji: "
|
||||
|
||||
#. TRANSLATORS: Indicates that there is no integrity check.
|
||||
#. This string is used in tables, so the width must not
|
||||
#. exceed ten columns with a fixed-width font.
|
||||
#: src/xz/list.c:65
|
||||
#: src/xz/list.c:62
|
||||
msgid "None"
|
||||
msgstr "Brak"
|
||||
|
||||
@@ -270,60 +203,60 @@ msgstr "Brak"
|
||||
#. strings are used in tables, so the width must not exceed ten
|
||||
#. columns with a fixed-width font. It's OK to omit the dash if
|
||||
#. you need space for one extra letter, but don't use spaces.
|
||||
#: src/xz/list.c:72
|
||||
#: src/xz/list.c:69
|
||||
msgid "Unknown-2"
|
||||
msgstr "Nieznany-2"
|
||||
|
||||
#: src/xz/list.c:73
|
||||
#: src/xz/list.c:70
|
||||
msgid "Unknown-3"
|
||||
msgstr "Nieznany-3"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
#: src/xz/list.c:72
|
||||
msgid "Unknown-5"
|
||||
msgstr "Nieznany-5"
|
||||
|
||||
#: src/xz/list.c:76
|
||||
#: src/xz/list.c:73
|
||||
msgid "Unknown-6"
|
||||
msgstr "Nieznany-6"
|
||||
|
||||
#: src/xz/list.c:77
|
||||
#: src/xz/list.c:74
|
||||
msgid "Unknown-7"
|
||||
msgstr "Nieznany-7"
|
||||
|
||||
#: src/xz/list.c:78
|
||||
#: src/xz/list.c:75
|
||||
msgid "Unknown-8"
|
||||
msgstr "Nieznany-8"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
#: src/xz/list.c:76
|
||||
msgid "Unknown-9"
|
||||
msgstr "Nieznany-9"
|
||||
|
||||
#: src/xz/list.c:81
|
||||
#: src/xz/list.c:78
|
||||
msgid "Unknown-11"
|
||||
msgstr "Nieznany11"
|
||||
|
||||
#: src/xz/list.c:82
|
||||
#: src/xz/list.c:79
|
||||
msgid "Unknown-12"
|
||||
msgstr "Nieznany12"
|
||||
|
||||
#: src/xz/list.c:83
|
||||
#: src/xz/list.c:80
|
||||
msgid "Unknown-13"
|
||||
msgstr "Nieznany13"
|
||||
|
||||
#: src/xz/list.c:84
|
||||
#: src/xz/list.c:81
|
||||
msgid "Unknown-14"
|
||||
msgstr "Nieznany14"
|
||||
|
||||
#: src/xz/list.c:85
|
||||
#: src/xz/list.c:82
|
||||
msgid "Unknown-15"
|
||||
msgstr "Nieznany15"
|
||||
|
||||
#: src/xz/list.c:153
|
||||
#: src/xz/list.c:126
|
||||
#, c-format
|
||||
msgid "%s: File is empty"
|
||||
msgstr "%s: Plik jest pusty"
|
||||
|
||||
#: src/xz/list.c:158
|
||||
#: src/xz/list.c:131
|
||||
#, c-format
|
||||
msgid "%s: Too small to be a valid .xz file"
|
||||
msgstr "%s: Za mały na poprawny plik .xz"
|
||||
@@ -332,41 +265,41 @@ msgstr "%s: Za mały na poprawny plik .xz"
|
||||
#. to Ratio, the columns are right aligned. Check and Filename
|
||||
#. are left aligned. If you need longer words, it's OK to
|
||||
#. use two lines here. Test with "xz -l foo.xz".
|
||||
#: src/xz/list.c:671
|
||||
#: src/xz/list.c:603
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr "Strum. Bloki Spakowany Rozpakowany Wsp. Kontrola Nazwa pliku"
|
||||
|
||||
#: src/xz/list.c:711
|
||||
#: src/xz/list.c:643
|
||||
#, c-format
|
||||
msgid " Streams: %s\n"
|
||||
msgstr " Strumienie: %s\n"
|
||||
|
||||
#: src/xz/list.c:713
|
||||
#: src/xz/list.c:645
|
||||
#, c-format
|
||||
msgid " Blocks: %s\n"
|
||||
msgstr " Bloki: %s\n"
|
||||
|
||||
#: src/xz/list.c:715
|
||||
#: src/xz/list.c:647
|
||||
#, c-format
|
||||
msgid " Compressed size: %s\n"
|
||||
msgstr " Rozmiar spakowany: %s\n"
|
||||
|
||||
#: src/xz/list.c:718
|
||||
#: src/xz/list.c:650
|
||||
#, c-format
|
||||
msgid " Uncompressed size: %s\n"
|
||||
msgstr " Rozmiar rozpakowany: %s\n"
|
||||
|
||||
#: src/xz/list.c:721
|
||||
#: src/xz/list.c:653
|
||||
#, c-format
|
||||
msgid " Ratio: %s\n"
|
||||
msgstr " Współczynnik: %s\n"
|
||||
|
||||
#: src/xz/list.c:723
|
||||
#: src/xz/list.c:655
|
||||
#, c-format
|
||||
msgid " Check: %s\n"
|
||||
msgstr " Kontrola spójności: %s\n"
|
||||
|
||||
#: src/xz/list.c:724
|
||||
#: src/xz/list.c:656
|
||||
#, c-format
|
||||
msgid " Stream padding: %s\n"
|
||||
msgstr " Wyrównanie strumienia: %s\n"
|
||||
@@ -374,7 +307,7 @@ msgstr " Wyrównanie strumienia: %s\n"
|
||||
#. TRANSLATORS: The second line is column headings. All except
|
||||
#. Check are right aligned; Check is left aligned. Test with
|
||||
#. "xz -lv foo.xz".
|
||||
#: src/xz/list.c:752
|
||||
#: src/xz/list.c:684
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
|
||||
@@ -384,7 +317,7 @@ msgstr ""
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
#: src/xz/list.c:807
|
||||
#: src/xz/list.c:739
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
@@ -400,37 +333,32 @@ msgstr ""
|
||||
#. are right aligned. %*s is replaced with 0-120
|
||||
#. spaces to make the CheckVal column wide enough.
|
||||
#. Test with "xz -lvv foo.xz".
|
||||
#: src/xz/list.c:819
|
||||
#: src/xz/list.c:751
|
||||
#, c-format
|
||||
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
msgstr " S.kontr. %*sNagłówek Flagi Rozm. spak. Uż.pamięci Filtry"
|
||||
|
||||
#: src/xz/list.c:897 src/xz/list.c:1072
|
||||
#: src/xz/list.c:829 src/xz/list.c:998
|
||||
#, c-format
|
||||
msgid " Memory needed: %s MiB\n"
|
||||
msgstr " Wymagana pamięć: %s MiB\n"
|
||||
|
||||
#: src/xz/list.c:899 src/xz/list.c:1074
|
||||
#: src/xz/list.c:831 src/xz/list.c:1000
|
||||
#, c-format
|
||||
msgid " Sizes in headers: %s\n"
|
||||
msgstr " Rozmiar w nagłówkach: %s\n"
|
||||
|
||||
#: src/xz/list.c:900 src/xz/list.c:1075
|
||||
#: src/xz/list.c:832 src/xz/list.c:1001
|
||||
msgid "Yes"
|
||||
msgstr "Tak"
|
||||
|
||||
#: src/xz/list.c:900 src/xz/list.c:1075
|
||||
#: src/xz/list.c:832 src/xz/list.c:1001
|
||||
msgid "No"
|
||||
msgstr "Nie"
|
||||
|
||||
#: src/xz/list.c:901 src/xz/list.c:1076
|
||||
#, c-format
|
||||
msgid " Minimum XZ Utils version: %s\n"
|
||||
msgstr " Minimalna wersja XZ Utils: %s\n"
|
||||
|
||||
#. TRANSLATORS: %s is an integer. Only the plural form of this
|
||||
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
|
||||
#: src/xz/list.c:1051
|
||||
#: src/xz/list.c:977
|
||||
#, c-format
|
||||
msgid "%s file\n"
|
||||
msgid_plural "%s files\n"
|
||||
@@ -438,20 +366,20 @@ msgstr[0] "%s plik\n"
|
||||
msgstr[1] "%s pliki\n"
|
||||
msgstr[2] "%s plików\n"
|
||||
|
||||
#: src/xz/list.c:1064
|
||||
#: src/xz/list.c:990
|
||||
msgid "Totals:"
|
||||
msgstr "Sumarycznie:"
|
||||
|
||||
#: src/xz/list.c:1065
|
||||
#: src/xz/list.c:991
|
||||
#, c-format
|
||||
msgid " Number of files: %s\n"
|
||||
msgstr " Liczba plików: %s\n"
|
||||
|
||||
#: src/xz/list.c:1140
|
||||
#: src/xz/list.c:1063
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr "--list działa tylko z plikami .xz (--format=xz lub --format=auto)"
|
||||
|
||||
#: src/xz/list.c:1146
|
||||
#: src/xz/list.c:1069
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr "--list nie obsługuje odczytu ze standardowego wejścia"
|
||||
|
||||
@@ -482,68 +410,68 @@ msgstr "Nie można odczytać danych ze standardowego wejścia przy czytaniu nazw
|
||||
#. of the line in messages. Usually it becomes "xz: ".
|
||||
#. This is a translatable string because French needs
|
||||
#. a space before a colon.
|
||||
#: src/xz/message.c:713
|
||||
#: src/xz/message.c:733
|
||||
#, c-format
|
||||
msgid "%s: "
|
||||
msgstr "%s: "
|
||||
|
||||
#: src/xz/message.c:776 src/xz/message.c:826
|
||||
#: src/xz/message.c:796 src/xz/message.c:846
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Błąd wewnętrzny"
|
||||
|
||||
#: src/xz/message.c:783
|
||||
#: src/xz/message.c:803
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Nie można ustawić obsługi sygnałów"
|
||||
|
||||
#: src/xz/message.c:792
|
||||
#: src/xz/message.c:812
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "Brak kontroli spójności; poprawność plików nie będzie weryfikowana"
|
||||
|
||||
#: src/xz/message.c:795
|
||||
#: src/xz/message.c:815
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr "Nieobsługiwany typ kontroli spójności; poprawność plików nie będzie weryfikowana"
|
||||
|
||||
#: src/xz/message.c:802
|
||||
#: src/xz/message.c:822
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Osiągnięto limit użycia pamięci"
|
||||
|
||||
#: src/xz/message.c:805
|
||||
#: src/xz/message.c:825
|
||||
msgid "File format not recognized"
|
||||
msgstr "Nie rozpoznany format pliku"
|
||||
|
||||
#: src/xz/message.c:808
|
||||
#: src/xz/message.c:828
|
||||
msgid "Unsupported options"
|
||||
msgstr "Nieobsługiwane opcje"
|
||||
|
||||
#: src/xz/message.c:811
|
||||
#: src/xz/message.c:831
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Dane skompresowane są uszkodzone"
|
||||
|
||||
#: src/xz/message.c:814
|
||||
#: src/xz/message.c:834
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Nieoczekiwany koniec wejścia"
|
||||
|
||||
#: src/xz/message.c:847
|
||||
#: src/xz/message.c:867
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limiter is disabled."
|
||||
msgstr "Wymagane jest %s MiB pamięci. Limit jest wyłączony."
|
||||
|
||||
#: src/xz/message.c:875
|
||||
#: src/xz/message.c:895
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "Wymagane jest %s MiB pamięci. Limit to %s."
|
||||
|
||||
#: src/xz/message.c:1042
|
||||
#: src/xz/message.c:1062
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: Łańcuch filtrów: %s\n"
|
||||
|
||||
#: src/xz/message.c:1052
|
||||
#: src/xz/message.c:1072
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Polecenie `%s --help' pokaże więcej informacji."
|
||||
|
||||
#: src/xz/message.c:1078
|
||||
#: src/xz/message.c:1098
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
@@ -554,17 +482,17 @@ msgstr ""
|
||||
"Kompresja lub dekompresja PLIKÓW w formacie .xz.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:1085
|
||||
#: src/xz/message.c:1105
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Argumenty obowiązkowe dla opcji długich są obowiązkowe również dla opcji\n"
|
||||
"krótkich.\n"
|
||||
|
||||
#: src/xz/message.c:1089
|
||||
#: src/xz/message.c:1109
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " Tryb pracy:\n"
|
||||
|
||||
#: src/xz/message.c:1092
|
||||
#: src/xz/message.c:1112
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
@@ -576,7 +504,7 @@ msgstr ""
|
||||
" -t, --test sprawdzenie spójności plików skompresowanych\n"
|
||||
" -l, --list wypisanie informacji o plikach .xz"
|
||||
|
||||
#: src/xz/message.c:1098
|
||||
#: src/xz/message.c:1118
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
@@ -584,7 +512,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Modyfikatory operacji:\n"
|
||||
|
||||
#: src/xz/message.c:1101
|
||||
#: src/xz/message.c:1121
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
@@ -594,15 +522,7 @@ msgstr ""
|
||||
" -f, --force nadpisywanie plików wyjściowych i (de)kompresja dowiązań\n"
|
||||
" -c, --stdout zapis na standardowe wyjście, nieusuwanie plików wej."
|
||||
|
||||
#: src/xz/message.c:1107
|
||||
msgid ""
|
||||
" --single-stream decompress only the first stream, and silently\n"
|
||||
" ignore possible remaining input data"
|
||||
msgstr ""
|
||||
" --single-stream dekompresja tylko pierwszego strumienia, ciche\n"
|
||||
" zignorowanie pozostałych danych wejściowych"
|
||||
|
||||
#: src/xz/message.c:1110
|
||||
#: src/xz/message.c:1127
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
@@ -618,7 +538,7 @@ msgstr ""
|
||||
" wejścia; muszą być zakończone znakiem nowej linii\n"
|
||||
" --files0[=PLIK] podobnie do --files, ale znakiem kończącym musi być NUL"
|
||||
|
||||
#: src/xz/message.c:1119
|
||||
#: src/xz/message.c:1135
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
@@ -626,7 +546,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Podstawowe opcje formatu pliku i kompresji:\n"
|
||||
|
||||
#: src/xz/message.c:1121
|
||||
#: src/xz/message.c:1137
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
@@ -638,11 +558,7 @@ msgstr ""
|
||||
" -C, --check=TEST typ kontroli spójności: `none' (ostrożnie!),\n"
|
||||
" `crc32', `crc64' (domyślny) lub `sha256'"
|
||||
|
||||
#: src/xz/message.c:1126
|
||||
msgid " --ignore-check don't verify the integrity check when decompressing"
|
||||
msgstr " --ignore-check bez kontroli sprawdzania integralności przy dekompresji"
|
||||
|
||||
#: src/xz/message.c:1130
|
||||
#: src/xz/message.c:1144
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
@@ -651,7 +567,7 @@ msgstr ""
|
||||
" użyciem wartości 7-9 należy wziąć pod uwagę wykorzystanie\n"
|
||||
" pamięci przy kompresji *oraz* dekompresji!"
|
||||
|
||||
#: src/xz/message.c:1134
|
||||
#: src/xz/message.c:1148
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
@@ -660,48 +576,7 @@ msgstr ""
|
||||
" ilości czasu procesora; nie wpływa na wymagania\n"
|
||||
" pamięciowe dekompresora"
|
||||
|
||||
#: src/xz/message.c:1138
|
||||
msgid ""
|
||||
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
|
||||
" to use as many threads as there are processor cores"
|
||||
msgstr ""
|
||||
" -T, --threads=ILE użycie maksymalnie ILU wątków; domyślnie 1; 0 oznacza\n"
|
||||
" tyle, ile jest rdzeni procesorów"
|
||||
|
||||
#: src/xz/message.c:1143
|
||||
msgid ""
|
||||
" --block-size=SIZE\n"
|
||||
" start a new .xz block after every SIZE bytes of input;\n"
|
||||
" use this to set the block size for threaded compression"
|
||||
msgstr ""
|
||||
" --block-size=ROZMIAR\n"
|
||||
" rozpoczęcie nowego bloku .xz co ROZMIAR bajtów wejścia;\n"
|
||||
" opcja służy do ustawienia rozmiaru bloku dla kompresji\n"
|
||||
" wielowątkowej"
|
||||
|
||||
#: src/xz/message.c:1147
|
||||
msgid ""
|
||||
" --block-list=SIZES\n"
|
||||
" start a new .xz block after the given comma-separated\n"
|
||||
" intervals of uncompressed data"
|
||||
msgstr ""
|
||||
" --block-list=ROZMIARY\n"
|
||||
" rozpoczęcie nowego bloku .xz po rozdzielonych przecinkiem\n"
|
||||
" przedziałach danych nieskompresowanych"
|
||||
|
||||
#: src/xz/message.c:1151
|
||||
msgid ""
|
||||
" --flush-timeout=TIMEOUT\n"
|
||||
" when compressing, if more than TIMEOUT milliseconds has\n"
|
||||
" passed since the previous flush and reading more input\n"
|
||||
" would block, all pending data is flushed out"
|
||||
msgstr ""
|
||||
" --flush-timeout=CZAS\n"
|
||||
" przy kompresji, jeśli minęło więcej niż CZAS milisekund\n"
|
||||
" ostatniegu zapisu bloku, a odczyt kolejnych danych byłby\n"
|
||||
" blokujący, wszystkie gotowe dane są zapisywane"
|
||||
|
||||
#: src/xz/message.c:1157
|
||||
#: src/xz/message.c:1153
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
@@ -717,7 +592,7 @@ msgstr ""
|
||||
" dekompresji lub obu; LIMIT jest w bajtach, % RAM lub 0\n"
|
||||
" dla limitów domyślnych"
|
||||
|
||||
#: src/xz/message.c:1164
|
||||
#: src/xz/message.c:1160
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
@@ -726,7 +601,7 @@ msgstr ""
|
||||
" pamięci, zostanie zgłoszony błąd zamiast zmniejszania\n"
|
||||
" ustawień"
|
||||
|
||||
#: src/xz/message.c:1170
|
||||
#: src/xz/message.c:1166
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
@@ -734,7 +609,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Łańcuch własnych filtrów do kompresji (alternatywa do używania -0 .. -9):"
|
||||
|
||||
#: src/xz/message.c:1179
|
||||
#: src/xz/message.c:1175
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
@@ -763,7 +638,7 @@ msgstr ""
|
||||
" mf=NAZWA dopasowywacz (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=ILE maks. głębokość szukania; 0=auto (domyślne)"
|
||||
|
||||
#: src/xz/message.c:1194
|
||||
#: src/xz/message.c:1190
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@@ -785,7 +660,7 @@ msgstr ""
|
||||
" Poprawne OPCJE dla wszystkich filtrów BCJ:\n"
|
||||
" start=ILE offset początku konwersji (domyślnie=0)"
|
||||
|
||||
#: src/xz/message.c:1206
|
||||
#: src/xz/message.c:1202
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
@@ -797,7 +672,7 @@ msgstr ""
|
||||
" dist=ILE odległość między bajtami odejmowanymi od\n"
|
||||
" siebie (1-256; 1)"
|
||||
|
||||
#: src/xz/message.c:1214
|
||||
#: src/xz/message.c:1210
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
@@ -805,7 +680,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Inne opcje:\n"
|
||||
|
||||
#: src/xz/message.c:1217
|
||||
#: src/xz/message.c:1213
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
@@ -813,15 +688,15 @@ msgstr ""
|
||||
" -q, --quiet pominięcie ostrzeżeń; dwukrotne podanie pomija też błędy\n"
|
||||
" -v, --verbose więcej informacji; dwukrotne podanie to jeszcze więcej"
|
||||
|
||||
#: src/xz/message.c:1222
|
||||
#: src/xz/message.c:1218
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn ostrzeżenia nie mają wpływu na status zakończenia"
|
||||
|
||||
#: src/xz/message.c:1224
|
||||
#: src/xz/message.c:1220
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr " --robot komunikaty w formacie dla maszyny (do skryptów)"
|
||||
|
||||
#: src/xz/message.c:1227
|
||||
#: src/xz/message.c:1223
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
@@ -829,7 +704,7 @@ msgstr ""
|
||||
" --info-memory wyświetlenie całkowitej ilości pamięci RAM oraz aktualnie\n"
|
||||
" aktywnych limitów pamięci i zakończenie pracy"
|
||||
|
||||
#: src/xz/message.c:1230
|
||||
#: src/xz/message.c:1226
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
@@ -837,7 +712,7 @@ msgstr ""
|
||||
" -h, --help wyświetlenie krótkiego opisu (tylko podstawowe opcje)\n"
|
||||
" -H, --long-help wyświetlenie tego długiego opisu i zakończenie"
|
||||
|
||||
#: src/xz/message.c:1234
|
||||
#: src/xz/message.c:1230
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
@@ -845,11 +720,11 @@ msgstr ""
|
||||
" -h, --help wyświetlenie tego krótkiego opisu i zakończenie\n"
|
||||
" -H, --long-help wyświetlenie długiego opisu (także opcje zaawansowane)"
|
||||
|
||||
#: src/xz/message.c:1239
|
||||
#: src/xz/message.c:1235
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version wyświetlenie informacji o wersji i zakończenie"
|
||||
|
||||
#: src/xz/message.c:1241
|
||||
#: src/xz/message.c:1237
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
@@ -861,7 +736,7 @@ msgstr ""
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1247
|
||||
#: src/xz/message.c:1243
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
@@ -870,15 +745,11 @@ msgstr ""
|
||||
"Błędy w tłumaczeniu prosimy zgłaszać na adres\n"
|
||||
"<translation-team-pl@lists.sourceforge.net>.\n"
|
||||
|
||||
#: src/xz/message.c:1249
|
||||
#: src/xz/message.c:1245
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "Strona domowa %s: <%s>\n"
|
||||
|
||||
#: src/xz/message.c:1253
|
||||
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
|
||||
msgstr "TA WERSJA JEST ROZWOJOWA, NIE PRZEZNACZONA DO UŻYTKU PRODUKCYJNEGO."
|
||||
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
@@ -908,54 +779,54 @@ msgstr "Suma lc i lp nie może przekroczyć 4"
|
||||
msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
msgstr "Wybrany dopasowywacz wymaga przynajmniej nice=%<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:133 src/xz/suffix.c:258
|
||||
#: src/xz/suffix.c:101 src/xz/suffix.c:194
|
||||
#, c-format
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s: Przy --format=raw i zapisie do pliku wymagana jest opcja --suffix=.ROZ"
|
||||
|
||||
#: src/xz/suffix.c:164
|
||||
#: src/xz/suffix.c:121
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s: Nazwa pliku ma nieznane rozszerzenie, pominięto"
|
||||
|
||||
#: src/xz/suffix.c:185
|
||||
#: src/xz/suffix.c:175 src/xz/suffix.c:184
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s: Plik już ma rozszerzenie `%s', pominięto"
|
||||
|
||||
#: src/xz/suffix.c:393
|
||||
#: src/xz/suffix.c:235
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: Błędne rozszerzenie nazwy pliku"
|
||||
|
||||
#: src/xz/util.c:71
|
||||
#: src/xz/util.c:61
|
||||
#, c-format
|
||||
msgid "%s: Value is not a non-negative decimal integer"
|
||||
msgstr "%s: Wartość nie jest nieujemną liczbą całkowitą"
|
||||
|
||||
#: src/xz/util.c:113
|
||||
#: src/xz/util.c:103
|
||||
#, c-format
|
||||
msgid "%s: Invalid multiplier suffix"
|
||||
msgstr "%s: Błędny przyrostek mnożnika"
|
||||
|
||||
#: src/xz/util.c:115
|
||||
#: src/xz/util.c:105
|
||||
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
msgstr "Poprawne przyrostki to `KiB' (2^10), `MiB' (2^20) i `GiB' (2^30)."
|
||||
|
||||
#: src/xz/util.c:132
|
||||
#: src/xz/util.c:122
|
||||
#, c-format
|
||||
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr "Wartość opcji `%s' musi być w przedziale [%<PRIu64>, %<PRIu64>]"
|
||||
|
||||
#: src/xz/util.c:257
|
||||
#: src/xz/util.c:247
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr "Pusta nazwa pliku, pominięto"
|
||||
|
||||
#: src/xz/util.c:271
|
||||
#: src/xz/util.c:261
|
||||
msgid "Compressed data cannot be read from a terminal"
|
||||
msgstr "Dane skompresowane nie mogą być czytane z terminala"
|
||||
|
||||
#: src/xz/util.c:284
|
||||
#: src/xz/util.c:274
|
||||
msgid "Compressed data cannot be written to a terminal"
|
||||
msgstr "Dane skompresowane nie mogą być zapisywane na terminal"
|
||||
|
||||
|
||||
@@ -19,24 +19,4 @@ if COND_SCRIPTS
|
||||
SUBDIRS += scripts
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
common/common_w32res.rc \
|
||||
common/mythread.h \
|
||||
common/sysdefs.h \
|
||||
common/tuklib_common.h \
|
||||
common/tuklib_config.h \
|
||||
common/tuklib_cpucores.c \
|
||||
common/tuklib_cpucores.h \
|
||||
common/tuklib_exit.c \
|
||||
common/tuklib_exit.h \
|
||||
common/tuklib_gettext.h \
|
||||
common/tuklib_integer.h \
|
||||
common/tuklib_mbstr_fw.c \
|
||||
common/tuklib_mbstr.h \
|
||||
common/tuklib_mbstr_width.c \
|
||||
common/tuklib_open_stdxxx.c \
|
||||
common/tuklib_open_stdxxx.h \
|
||||
common/tuklib_physmem.c \
|
||||
common/tuklib_physmem.h \
|
||||
common/tuklib_progname.c \
|
||||
common/tuklib_progname.h
|
||||
EXTRA_DIST = common
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file mythread.h
|
||||
/// \brief Some threading related helper macros and functions
|
||||
/// \brief Wrappers for threads
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
@@ -10,512 +10,33 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef MYTHREAD_H
|
||||
#define MYTHREAD_H
|
||||
|
||||
#include "sysdefs.h"
|
||||
|
||||
// If any type of threading is enabled, #define MYTHREAD_ENABLED.
|
||||
#if defined(MYTHREAD_POSIX) || defined(MYTHREAD_WIN95) \
|
||||
|| defined(MYTHREAD_VISTA)
|
||||
# define MYTHREAD_ENABLED 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PTHREAD
|
||||
# include <pthread.h>
|
||||
|
||||
#ifdef MYTHREAD_ENABLED
|
||||
|
||||
////////////////////////////////////////
|
||||
// Shared between all threading types //
|
||||
////////////////////////////////////////
|
||||
|
||||
// Locks a mutex for a duration of a block.
|
||||
//
|
||||
// Perform mythread_mutex_lock(&mutex) in the beginning of a block
|
||||
// and mythread_mutex_unlock(&mutex) at the end of the block. "break"
|
||||
// may be used to unlock the mutex and jump out of the block.
|
||||
// mythread_sync blocks may be nested.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// mythread_sync(mutex) {
|
||||
// foo();
|
||||
// if (some_error)
|
||||
// break; // Skips bar()
|
||||
// bar();
|
||||
// }
|
||||
//
|
||||
// At least GCC optimizes the loops completely away so it doesn't slow
|
||||
// things down at all compared to plain mythread_mutex_lock(&mutex)
|
||||
// and mythread_mutex_unlock(&mutex) calls.
|
||||
//
|
||||
#define mythread_sync(mutex) mythread_sync_helper1(mutex, __LINE__)
|
||||
#define mythread_sync_helper1(mutex, line) mythread_sync_helper2(mutex, line)
|
||||
#define mythread_sync_helper2(mutex, line) \
|
||||
for (unsigned int mythread_i_ ## line = 0; \
|
||||
mythread_i_ ## line \
|
||||
? (mythread_mutex_unlock(&(mutex)), 0) \
|
||||
: (mythread_mutex_lock(&(mutex)), 1); \
|
||||
mythread_i_ ## line = 1) \
|
||||
for (unsigned int mythread_j_ ## line = 0; \
|
||||
!mythread_j_ ## line; \
|
||||
mythread_j_ ## line = 1)
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(MYTHREAD_ENABLED)
|
||||
|
||||
//////////////////
|
||||
// No threading //
|
||||
//////////////////
|
||||
|
||||
// Calls the given function once. This isn't thread safe.
|
||||
#define mythread_once(func) \
|
||||
do { \
|
||||
static bool once_ = false; \
|
||||
if (!once_) { \
|
||||
func(); \
|
||||
once_ = true; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#if !(defined(_WIN32) && !defined(__CYGWIN__))
|
||||
// Use sigprocmask() to set the signal mask in single-threaded programs.
|
||||
#include <signal.h>
|
||||
|
||||
static inline void
|
||||
mythread_sigmask(int how, const sigset_t *restrict set,
|
||||
sigset_t *restrict oset)
|
||||
{
|
||||
int ret = sigprocmask(how, set, oset);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#elif defined(MYTHREAD_POSIX)
|
||||
|
||||
////////////////////
|
||||
// Using pthreads //
|
||||
////////////////////
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define MYTHREAD_RET_TYPE void *
|
||||
#define MYTHREAD_RET_VALUE NULL
|
||||
|
||||
typedef pthread_t mythread;
|
||||
typedef pthread_mutex_t mythread_mutex;
|
||||
|
||||
typedef struct {
|
||||
pthread_cond_t cond;
|
||||
#ifdef HAVE_CLOCK_GETTIME
|
||||
// Clock ID (CLOCK_REALTIME or CLOCK_MONOTONIC) associated with
|
||||
// the condition variable.
|
||||
clockid_t clk_id;
|
||||
#endif
|
||||
} mythread_cond;
|
||||
|
||||
typedef struct timespec mythread_condtime;
|
||||
|
||||
|
||||
// Calls the given function once in a thread-safe way.
|
||||
#define mythread_once(func) \
|
||||
# define mythread_once(func) \
|
||||
do { \
|
||||
static pthread_once_t once_ = PTHREAD_ONCE_INIT; \
|
||||
pthread_once(&once_, &func); \
|
||||
} while (0)
|
||||
|
||||
# define mythread_sigmask(how, set, oset) \
|
||||
pthread_sigmask(how, set, oset)
|
||||
|
||||
// Use pthread_sigmask() to set the signal mask in multi-threaded programs.
|
||||
// Do nothing on OpenVMS since it lacks pthread_sigmask().
|
||||
static inline void
|
||||
mythread_sigmask(int how, const sigset_t *restrict set,
|
||||
sigset_t *restrict oset)
|
||||
{
|
||||
#ifdef __VMS
|
||||
(void)how;
|
||||
(void)set;
|
||||
(void)oset;
|
||||
#else
|
||||
int ret = pthread_sigmask(how, set, oset);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// Creates a new thread with all signals blocked. Returns zero on success
|
||||
// and non-zero on error.
|
||||
static inline int
|
||||
mythread_create(mythread *thread, void *(*func)(void *arg), void *arg)
|
||||
{
|
||||
sigset_t old;
|
||||
sigset_t all;
|
||||
sigfillset(&all);
|
||||
|
||||
mythread_sigmask(SIG_SETMASK, &all, &old);
|
||||
const int ret = pthread_create(thread, NULL, func, arg);
|
||||
mythread_sigmask(SIG_SETMASK, &old, NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Joins a thread. Returns zero on success and non-zero on error.
|
||||
static inline int
|
||||
mythread_join(mythread thread)
|
||||
{
|
||||
return pthread_join(thread, NULL);
|
||||
}
|
||||
|
||||
|
||||
// Initiatlizes a mutex. Returns zero on success and non-zero on error.
|
||||
static inline int
|
||||
mythread_mutex_init(mythread_mutex *mutex)
|
||||
{
|
||||
return pthread_mutex_init(mutex, NULL);
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_mutex_destroy(mythread_mutex *mutex)
|
||||
{
|
||||
int ret = pthread_mutex_destroy(mutex);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_mutex_lock(mythread_mutex *mutex)
|
||||
{
|
||||
int ret = pthread_mutex_lock(mutex);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_mutex_unlock(mythread_mutex *mutex)
|
||||
{
|
||||
int ret = pthread_mutex_unlock(mutex);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
}
|
||||
|
||||
|
||||
// Initializes a condition variable.
|
||||
//
|
||||
// Using CLOCK_MONOTONIC instead of the default CLOCK_REALTIME makes the
|
||||
// timeout in pthread_cond_timedwait() work correctly also if system time
|
||||
// is suddenly changed. Unfortunately CLOCK_MONOTONIC isn't available
|
||||
// everywhere while the default CLOCK_REALTIME is, so the default is
|
||||
// used if CLOCK_MONOTONIC isn't available.
|
||||
//
|
||||
// If clock_gettime() isn't available at all, gettimeofday() will be used.
|
||||
static inline int
|
||||
mythread_cond_init(mythread_cond *mycond)
|
||||
{
|
||||
#ifdef HAVE_CLOCK_GETTIME
|
||||
// NOTE: HAVE_DECL_CLOCK_MONOTONIC is always defined to 0 or 1.
|
||||
# if defined(HAVE_PTHREAD_CONDATTR_SETCLOCK) && HAVE_DECL_CLOCK_MONOTONIC
|
||||
struct timespec ts;
|
||||
pthread_condattr_t condattr;
|
||||
|
||||
// POSIX doesn't seem to *require* that pthread_condattr_setclock()
|
||||
// will fail if given an unsupported clock ID. Test that
|
||||
// CLOCK_MONOTONIC really is supported using clock_gettime().
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0
|
||||
&& pthread_condattr_init(&condattr) == 0) {
|
||||
int ret = pthread_condattr_setclock(
|
||||
&condattr, CLOCK_MONOTONIC);
|
||||
if (ret == 0)
|
||||
ret = pthread_cond_init(&mycond->cond, &condattr);
|
||||
|
||||
pthread_condattr_destroy(&condattr);
|
||||
|
||||
if (ret == 0) {
|
||||
mycond->clk_id = CLOCK_MONOTONIC;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// If anything above fails, fall back to the default CLOCK_REALTIME.
|
||||
// POSIX requires that all implementations of clock_gettime() must
|
||||
// support at least CLOCK_REALTIME.
|
||||
# endif
|
||||
|
||||
mycond->clk_id = CLOCK_REALTIME;
|
||||
#endif
|
||||
|
||||
return pthread_cond_init(&mycond->cond, NULL);
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_cond_destroy(mythread_cond *cond)
|
||||
{
|
||||
int ret = pthread_cond_destroy(&cond->cond);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_cond_signal(mythread_cond *cond)
|
||||
{
|
||||
int ret = pthread_cond_signal(&cond->cond);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_cond_wait(mythread_cond *cond, mythread_mutex *mutex)
|
||||
{
|
||||
int ret = pthread_cond_wait(&cond->cond, mutex);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
}
|
||||
|
||||
// Waits on a condition or until a timeout expires. If the timeout expires,
|
||||
// non-zero is returned, otherwise zero is returned.
|
||||
static inline int
|
||||
mythread_cond_timedwait(mythread_cond *cond, mythread_mutex *mutex,
|
||||
const mythread_condtime *condtime)
|
||||
{
|
||||
int ret = pthread_cond_timedwait(&cond->cond, mutex, condtime);
|
||||
assert(ret == 0 || ret == ETIMEDOUT);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Sets condtime to the absolute time that is timeout_ms milliseconds
|
||||
// in the future. The type of the clock to use is taken from cond.
|
||||
static inline void
|
||||
mythread_condtime_set(mythread_condtime *condtime, const mythread_cond *cond,
|
||||
uint32_t timeout_ms)
|
||||
{
|
||||
condtime->tv_sec = timeout_ms / 1000;
|
||||
condtime->tv_nsec = (timeout_ms % 1000) * 1000000;
|
||||
|
||||
#ifdef HAVE_CLOCK_GETTIME
|
||||
struct timespec now;
|
||||
int ret = clock_gettime(cond->clk_id, &now);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
|
||||
condtime->tv_sec += now.tv_sec;
|
||||
condtime->tv_nsec += now.tv_nsec;
|
||||
#else
|
||||
(void)cond;
|
||||
|
||||
struct timeval now;
|
||||
gettimeofday(&now, NULL);
|
||||
|
||||
condtime->tv_sec += now.tv_sec;
|
||||
condtime->tv_nsec += now.tv_usec * 1000L;
|
||||
#endif
|
||||
|
||||
// tv_nsec must stay in the range [0, 999_999_999].
|
||||
if (condtime->tv_nsec >= 1000000000L) {
|
||||
condtime->tv_nsec -= 1000000000L;
|
||||
++condtime->tv_sec;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#elif defined(MYTHREAD_WIN95) || defined(MYTHREAD_VISTA)
|
||||
|
||||
/////////////////////
|
||||
// Windows threads //
|
||||
/////////////////////
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#ifdef MYTHREAD_VISTA
|
||||
# undef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0600
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
|
||||
#define MYTHREAD_RET_TYPE unsigned int __stdcall
|
||||
#define MYTHREAD_RET_VALUE 0
|
||||
|
||||
typedef HANDLE mythread;
|
||||
typedef CRITICAL_SECTION mythread_mutex;
|
||||
|
||||
#ifdef MYTHREAD_WIN95
|
||||
typedef HANDLE mythread_cond;
|
||||
#else
|
||||
typedef CONDITION_VARIABLE mythread_cond;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
// Tick count (milliseconds) in the beginning of the timeout.
|
||||
// NOTE: This is 32 bits so it wraps around after 49.7 days.
|
||||
// Multi-day timeouts may not work as expected.
|
||||
DWORD start;
|
||||
|
||||
// Length of the timeout in milliseconds. The timeout expires
|
||||
// when the current tick count minus "start" is equal or greater
|
||||
// than "timeout".
|
||||
DWORD timeout;
|
||||
} mythread_condtime;
|
||||
|
||||
|
||||
// mythread_once() is only available with Vista threads.
|
||||
#ifdef MYTHREAD_VISTA
|
||||
#define mythread_once(func) \
|
||||
# define mythread_once(func) \
|
||||
do { \
|
||||
static INIT_ONCE once_ = INIT_ONCE_STATIC_INIT; \
|
||||
BOOL pending_; \
|
||||
if (!InitOnceBeginInitialize(&once_, 0, &pending_, NULL)) \
|
||||
abort(); \
|
||||
if (pending_) \
|
||||
static bool once_ = false; \
|
||||
if (!once_) { \
|
||||
func(); \
|
||||
if (!InitOnceComplete(&once, 0, NULL)) \
|
||||
abort(); \
|
||||
once_ = true; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
|
||||
// mythread_sigmask() isn't available on Windows. Even a dummy version would
|
||||
// make no sense because the other POSIX signal functions are missing anyway.
|
||||
|
||||
|
||||
static inline int
|
||||
mythread_create(mythread *thread,
|
||||
unsigned int (__stdcall *func)(void *arg), void *arg)
|
||||
{
|
||||
uintptr_t ret = _beginthreadex(NULL, 0, func, arg, 0, NULL);
|
||||
if (ret == 0)
|
||||
return -1;
|
||||
|
||||
*thread = (HANDLE)ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
mythread_join(mythread thread)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (WaitForSingleObject(thread, INFINITE) != WAIT_OBJECT_0)
|
||||
ret = -1;
|
||||
|
||||
if (!CloseHandle(thread))
|
||||
ret = -1;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static inline int
|
||||
mythread_mutex_init(mythread_mutex *mutex)
|
||||
{
|
||||
InitializeCriticalSection(mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_mutex_destroy(mythread_mutex *mutex)
|
||||
{
|
||||
DeleteCriticalSection(mutex);
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_mutex_lock(mythread_mutex *mutex)
|
||||
{
|
||||
EnterCriticalSection(mutex);
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_mutex_unlock(mythread_mutex *mutex)
|
||||
{
|
||||
LeaveCriticalSection(mutex);
|
||||
}
|
||||
|
||||
|
||||
static inline int
|
||||
mythread_cond_init(mythread_cond *cond)
|
||||
{
|
||||
#ifdef MYTHREAD_WIN95
|
||||
*cond = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
return *cond == NULL ? -1 : 0;
|
||||
#else
|
||||
InitializeConditionVariable(cond);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_cond_destroy(mythread_cond *cond)
|
||||
{
|
||||
#ifdef MYTHREAD_WIN95
|
||||
CloseHandle(*cond);
|
||||
#else
|
||||
(void)cond;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_cond_signal(mythread_cond *cond)
|
||||
{
|
||||
#ifdef MYTHREAD_WIN95
|
||||
SetEvent(*cond);
|
||||
#else
|
||||
WakeConditionVariable(cond);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_cond_wait(mythread_cond *cond, mythread_mutex *mutex)
|
||||
{
|
||||
#ifdef MYTHREAD_WIN95
|
||||
LeaveCriticalSection(mutex);
|
||||
WaitForSingleObject(*cond, INFINITE);
|
||||
EnterCriticalSection(mutex);
|
||||
#else
|
||||
BOOL ret = SleepConditionVariableCS(cond, mutex, INFINITE);
|
||||
assert(ret);
|
||||
(void)ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int
|
||||
mythread_cond_timedwait(mythread_cond *cond, mythread_mutex *mutex,
|
||||
const mythread_condtime *condtime)
|
||||
{
|
||||
#ifdef MYTHREAD_WIN95
|
||||
LeaveCriticalSection(mutex);
|
||||
#endif
|
||||
|
||||
DWORD elapsed = GetTickCount() - condtime->start;
|
||||
DWORD timeout = elapsed >= condtime->timeout
|
||||
? 0 : condtime->timeout - elapsed;
|
||||
|
||||
#ifdef MYTHREAD_WIN95
|
||||
DWORD ret = WaitForSingleObject(*cond, timeout);
|
||||
assert(ret == WAIT_OBJECT_0 || ret == WAIT_TIMEOUT);
|
||||
|
||||
EnterCriticalSection(mutex);
|
||||
|
||||
return ret == WAIT_TIMEOUT;
|
||||
#else
|
||||
BOOL ret = SleepConditionVariableCS(cond, mutex, timeout);
|
||||
assert(ret || GetLastError() == ERROR_TIMEOUT);
|
||||
return !ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
mythread_condtime_set(mythread_condtime *condtime, const mythread_cond *cond,
|
||||
uint32_t timeout)
|
||||
{
|
||||
(void)cond;
|
||||
condtime->start = GetTickCount();
|
||||
condtime->timeout = timeout;
|
||||
}
|
||||
|
||||
#endif
|
||||
# define mythread_sigmask(how, set, oset) \
|
||||
sigprocmask(how, set, oset)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -165,16 +165,6 @@ typedef unsigned char _Bool;
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
// As of MSVC 2013, inline and restrict are supported with
|
||||
// non-standard keywords.
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# ifndef inline
|
||||
# define inline __inline
|
||||
# endif
|
||||
# ifndef restrict
|
||||
# define restrict __restrict
|
||||
# endif
|
||||
#endif
|
||||
|
||||
////////////
|
||||
// Macros //
|
||||
|
||||
@@ -12,18 +12,7 @@
|
||||
|
||||
#include "tuklib_cpucores.h"
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
# ifndef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0500
|
||||
# endif
|
||||
# include <windows.h>
|
||||
|
||||
// FreeBSD
|
||||
#elif defined(TUKLIB_CPUCORES_CPUSET)
|
||||
# include <sys/param.h>
|
||||
# include <sys/cpuset.h>
|
||||
|
||||
#elif defined(TUKLIB_CPUCORES_SYSCTL)
|
||||
#if defined(TUKLIB_CPUCORES_SYSCTL)
|
||||
# ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
@@ -44,25 +33,7 @@ tuklib_cpucores(void)
|
||||
{
|
||||
uint32_t ret = 0;
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
SYSTEM_INFO sysinfo;
|
||||
GetSystemInfo(&sysinfo);
|
||||
ret = sysinfo.dwNumberOfProcessors;
|
||||
|
||||
#elif defined(TUKLIB_CPUCORES_CPUSET)
|
||||
cpuset_t set;
|
||||
if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1,
|
||||
sizeof(set), &set) == 0) {
|
||||
# ifdef CPU_COUNT
|
||||
ret = CPU_COUNT(&set);
|
||||
# else
|
||||
for (unsigned i = 0; i < CPU_SETSIZE; ++i)
|
||||
if (CPU_ISSET(i, &set))
|
||||
++ret;
|
||||
# endif
|
||||
}
|
||||
|
||||
#elif defined(TUKLIB_CPUCORES_SYSCTL)
|
||||
#if defined(TUKLIB_CPUCORES_SYSCTL)
|
||||
int name[2] = { CTL_HW, HW_NCPU };
|
||||
int cpus;
|
||||
size_t cpus_size = sizeof(cpus);
|
||||
|
||||
@@ -321,8 +321,8 @@ unaligned_read32le(const uint8_t *buf)
|
||||
static inline void
|
||||
unaligned_write16be(uint8_t *buf, uint16_t num)
|
||||
{
|
||||
buf[0] = (uint8_t)(num >> 8);
|
||||
buf[1] = (uint8_t)num;
|
||||
buf[0] = num >> 8;
|
||||
buf[1] = num;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -330,8 +330,8 @@ unaligned_write16be(uint8_t *buf, uint16_t num)
|
||||
static inline void
|
||||
unaligned_write16le(uint8_t *buf, uint16_t num)
|
||||
{
|
||||
buf[0] = (uint8_t)num;
|
||||
buf[1] = (uint8_t)(num >> 8);
|
||||
buf[0] = num;
|
||||
buf[1] = num >> 8;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -339,10 +339,10 @@ unaligned_write16le(uint8_t *buf, uint16_t num)
|
||||
static inline void
|
||||
unaligned_write32be(uint8_t *buf, uint32_t num)
|
||||
{
|
||||
buf[0] = (uint8_t)(num >> 24);
|
||||
buf[1] = (uint8_t)(num >> 16);
|
||||
buf[2] = (uint8_t)(num >> 8);
|
||||
buf[3] = (uint8_t)num;
|
||||
buf[0] = num >> 24;
|
||||
buf[1] = num >> 16;
|
||||
buf[2] = num >> 8;
|
||||
buf[3] = num;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -350,10 +350,10 @@ unaligned_write32be(uint8_t *buf, uint32_t num)
|
||||
static inline void
|
||||
unaligned_write32le(uint8_t *buf, uint32_t num)
|
||||
{
|
||||
buf[0] = (uint8_t)num;
|
||||
buf[1] = (uint8_t)(num >> 8);
|
||||
buf[2] = (uint8_t)(num >> 16);
|
||||
buf[3] = (uint8_t)(num >> 24);
|
||||
buf[0] = num;
|
||||
buf[1] = num >> 8;
|
||||
buf[2] = num >> 16;
|
||||
buf[3] = num >> 24;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,10 +37,7 @@
|
||||
# define __USE_INLINE__
|
||||
# include <proto/exec.h>
|
||||
|
||||
#elif defined(__QNX__)
|
||||
# include <sys/syspage.h>
|
||||
# include <string.h>
|
||||
|
||||
// AIX
|
||||
#elif defined(TUKLIB_PHYSMEM_AIX)
|
||||
# include <sys/systemcfg.h>
|
||||
|
||||
@@ -129,15 +126,6 @@ tuklib_physmem(void)
|
||||
#elif defined(AMIGA) || defined(__AROS__)
|
||||
ret = AvailMem(MEMF_TOTAL);
|
||||
|
||||
#elif defined(__QNX__)
|
||||
const struct asinfo_entry *entries = SYSPAGE_ENTRY(asinfo);
|
||||
size_t count = SYSPAGE_ENTRY_SIZE(asinfo) / sizeof(struct asinfo_entry);
|
||||
const char *strings = SYSPAGE_ENTRY(strings)->data;
|
||||
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
if (strcmp(strings + entries[i].name, "ram") == 0)
|
||||
ret += entries[i].end - entries[i].start + 1;
|
||||
|
||||
#elif defined(TUKLIB_PHYSMEM_AIX)
|
||||
ret = _system_configuration.physmem;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ CLEANFILES =
|
||||
doc_DATA =
|
||||
|
||||
lib_LTLIBRARIES = liblzma.la
|
||||
liblzma_la_SOURCES =
|
||||
liblzma_la_SOURCES = $(top_srcdir)/src/common/tuklib_physmem.c
|
||||
liblzma_la_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/liblzma/api \
|
||||
-I$(top_srcdir)/src/liblzma/common \
|
||||
@@ -24,19 +24,7 @@ liblzma_la_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/liblzma/simple \
|
||||
-I$(top_srcdir)/src/common \
|
||||
-DTUKLIB_SYMBOL_PREFIX=lzma_
|
||||
liblzma_la_LDFLAGS = -no-undefined -version-info 7:2:2
|
||||
|
||||
EXTRA_DIST += liblzma.map validate_map.sh
|
||||
if COND_SYMVERS
|
||||
liblzma_la_LDFLAGS += \
|
||||
-Wl,--version-script=$(top_srcdir)/src/liblzma/liblzma.map
|
||||
endif
|
||||
|
||||
liblzma_la_SOURCES += ../common/tuklib_physmem.c
|
||||
|
||||
if COND_THREADS
|
||||
liblzma_la_SOURCES += ../common/tuklib_cpucores.c
|
||||
endif
|
||||
liblzma_la_LDFLAGS = -no-undefined -version-info 5:8:0
|
||||
|
||||
include $(srcdir)/common/Makefile.inc
|
||||
include $(srcdir)/check/Makefile.inc
|
||||
@@ -115,7 +103,7 @@ liblzma.pc: $(srcdir)/liblzma.pc.in
|
||||
-e 's,@PACKAGE_URL[@],$(PACKAGE_URL),g' \
|
||||
-e 's,@PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
|
||||
-e 's,@PTHREAD_CFLAGS[@],$(PTHREAD_CFLAGS),g' \
|
||||
-e 's,@LIBS[@],$(LIBS),g' \
|
||||
-e 's,@PTHREAD_LIBS[@],$(PTHREAD_LIBS),g' \
|
||||
< $(srcdir)/liblzma.pc.in > $@ || { rm -f $@; exit 1; }
|
||||
|
||||
clean-local:
|
||||
|
||||
@@ -17,7 +17,7 @@ nobase_include_HEADERS = \
|
||||
lzma/hardware.h \
|
||||
lzma/index.h \
|
||||
lzma/index_hash.h \
|
||||
lzma/lzma12.h \
|
||||
lzma/lzma.h \
|
||||
lzma/stream_flags.h \
|
||||
lzma/version.h \
|
||||
lzma/vli.h
|
||||
|
||||
@@ -82,20 +82,12 @@
|
||||
# if !defined(UINT32_C) || !defined(UINT64_C) \
|
||||
|| !defined(UINT32_MAX) || !defined(UINT64_MAX)
|
||||
/*
|
||||
* MSVC versions older than 2013 have no C99 support, and
|
||||
* thus they cannot be used to compile liblzma. Using an
|
||||
* existing liblzma.dll with old MSVC can work though(*),
|
||||
* but we need to define the required standard integer
|
||||
* types here in a MSVC-specific way.
|
||||
*
|
||||
* (*) If you do this, the existing liblzma.dll probably uses
|
||||
* a different runtime library than your MSVC-built
|
||||
* application. Mixing runtimes is generally bad, but
|
||||
* in this case it should work as long as you avoid
|
||||
* the few rarely-needed liblzma functions that allocate
|
||||
* memory and expect the caller to free it using free().
|
||||
* MSVC has no C99 support, and thus it cannot be used to
|
||||
* compile liblzma. The liblzma API has to still be usable
|
||||
* from MSVC, so we need to define the required standard
|
||||
* integer types here.
|
||||
*/
|
||||
# if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800
|
||||
# if defined(_WIN32) && defined(_MSC_VER)
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
@@ -294,7 +286,7 @@ extern "C" {
|
||||
#include "lzma/filter.h"
|
||||
#include "lzma/bcj.h"
|
||||
#include "lzma/delta.h"
|
||||
#include "lzma/lzma12.h"
|
||||
#include "lzma/lzma.h"
|
||||
|
||||
/* Container formats */
|
||||
#include "lzma/container.h"
|
||||
|
||||
@@ -240,12 +240,12 @@ typedef enum {
|
||||
/**
|
||||
* \brief The `action' argument for lzma_code()
|
||||
*
|
||||
* After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, LZMA_FULL_BARRIER,
|
||||
* or LZMA_FINISH, the same `action' must is used until lzma_code() returns
|
||||
* LZMA_STREAM_END. Also, the amount of input (that is, strm->avail_in) must
|
||||
* not be modified by the application until lzma_code() returns
|
||||
* LZMA_STREAM_END. Changing the `action' or modifying the amount of input
|
||||
* will make lzma_code() return LZMA_PROG_ERROR.
|
||||
* After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or LZMA_FINISH,
|
||||
* the same `action' must is used until lzma_code() returns LZMA_STREAM_END.
|
||||
* Also, the amount of input (that is, strm->avail_in) must not be modified
|
||||
* by the application until lzma_code() returns LZMA_STREAM_END. Changing the
|
||||
* `action' or modifying the amount of input will make lzma_code() return
|
||||
* LZMA_PROG_ERROR.
|
||||
*/
|
||||
typedef enum {
|
||||
LZMA_RUN = 0,
|
||||
@@ -293,7 +293,7 @@ typedef enum {
|
||||
*
|
||||
* All the input data going to the current Block must have
|
||||
* been given to the encoder (the last bytes can still be
|
||||
* pending in *next_in). Call lzma_code() with LZMA_FULL_FLUSH
|
||||
* pending in* next_in). Call lzma_code() with LZMA_FULL_FLUSH
|
||||
* until it returns LZMA_STREAM_END. Then continue normally
|
||||
* with LZMA_RUN or finish the Stream with LZMA_FINISH.
|
||||
*
|
||||
@@ -302,29 +302,6 @@ typedef enum {
|
||||
* no unfinished Block, no empty Block is created.
|
||||
*/
|
||||
|
||||
LZMA_FULL_BARRIER = 4,
|
||||
/**<
|
||||
* \brief Finish encoding of the current Block
|
||||
*
|
||||
* This is like LZMA_FULL_FLUSH except that this doesn't
|
||||
* necessarily wait until all the input has been made
|
||||
* available via the output buffer. That is, lzma_code()
|
||||
* might return LZMA_STREAM_END as soon as all the input
|
||||
* has been consumed (avail_in == 0).
|
||||
*
|
||||
* LZMA_FULL_BARRIER is useful with a threaded encoder if
|
||||
* one wants to split the .xz Stream into Blocks at specific
|
||||
* offsets but doesn't care if the output isn't flushed
|
||||
* immediately. Using LZMA_FULL_BARRIER allows keeping
|
||||
* the threads busy while LZMA_FULL_FLUSH would make
|
||||
* lzma_code() wait until all the threads have finished
|
||||
* until more data could be passed to the encoder.
|
||||
*
|
||||
* With a lzma_stream initialized with the single-threaded
|
||||
* lzma_stream_encoder() or lzma_easy_encoder(),
|
||||
* LZMA_FULL_BARRIER is an alias for LZMA_FULL_FLUSH.
|
||||
*/
|
||||
|
||||
LZMA_FINISH = 3
|
||||
/**<
|
||||
* \brief Finish the coding operation
|
||||
@@ -355,19 +332,11 @@ typedef enum {
|
||||
* malloc() and free(). C++ users should note that the custom memory
|
||||
* handling functions must not throw exceptions.
|
||||
*
|
||||
* Single-threaded mode only: liblzma doesn't make an internal copy of
|
||||
* lzma_allocator. Thus, it is OK to change these function pointers in
|
||||
* the middle of the coding process, but obviously it must be done
|
||||
* carefully to make sure that the replacement `free' can deallocate
|
||||
* memory allocated by the earlier `alloc' function(s).
|
||||
*
|
||||
* Multithreaded mode: liblzma might internally store pointers to the
|
||||
* lzma_allocator given via the lzma_stream structure. The application
|
||||
* must not change the allocator pointer in lzma_stream or the contents
|
||||
* of the pointed lzma_allocator structure until lzma_end() has been used
|
||||
* to free the memory associated with that lzma_stream. The allocation
|
||||
* functions might be called simultaneously from multiple threads, and
|
||||
* thus they must be thread safe.
|
||||
* liblzma doesn't make an internal copy of lzma_allocator. Thus, it is
|
||||
* OK to change these function pointers in the middle of the coding
|
||||
* process, but obviously it must be done carefully to make sure that the
|
||||
* replacement `free' can deallocate memory allocated by the earlier
|
||||
* `alloc' function(s).
|
||||
*/
|
||||
typedef struct {
|
||||
/**
|
||||
@@ -479,8 +448,7 @@ typedef struct lzma_internal_s lzma_internal;
|
||||
*
|
||||
* Application may modify the values of total_in and total_out as it wants.
|
||||
* They are updated by liblzma to match the amount of data read and
|
||||
* written but aren't used for anything else except as a possible return
|
||||
* values from lzma_get_progress().
|
||||
* written, but aren't used for anything else.
|
||||
*/
|
||||
typedef struct {
|
||||
const uint8_t *next_in; /**< Pointer to the next input byte. */
|
||||
@@ -496,10 +464,8 @@ typedef struct {
|
||||
*
|
||||
* In most cases this is NULL which makes liblzma use
|
||||
* the standard malloc() and free().
|
||||
*
|
||||
* \note In 5.0.x this is not a const pointer.
|
||||
*/
|
||||
const lzma_allocator *allocator;
|
||||
lzma_allocator *allocator;
|
||||
|
||||
/** Internal state is not visible to applications. */
|
||||
lzma_internal *internal;
|
||||
@@ -580,25 +546,6 @@ extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
|
||||
extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get progress information
|
||||
*
|
||||
* In single-threaded mode, applications can get progress information from
|
||||
* strm->total_in and strm->total_out. In multi-threaded mode this is less
|
||||
* useful because a significant amount of both input and output data gets
|
||||
* buffered internally by liblzma. This makes total_in and total_out give
|
||||
* misleading information and also makes the progress indicator updates
|
||||
* non-smooth.
|
||||
*
|
||||
* This function gives realistic progress information also in multi-threaded
|
||||
* mode by taking into account the progress made by each thread. In
|
||||
* single-threaded mode *progress_in and *progress_out are set to
|
||||
* strm->total_in and strm->total_out, respectively.
|
||||
*/
|
||||
extern LZMA_API(void) lzma_get_progress(lzma_stream *strm,
|
||||
uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get the memory usage of decoder filter chain
|
||||
*
|
||||
|
||||
@@ -31,16 +31,11 @@ typedef struct {
|
||||
/**
|
||||
* \brief Block format version
|
||||
*
|
||||
* To prevent API and ABI breakages when new features are needed,
|
||||
* a version number is used to indicate which fields in this
|
||||
* structure are in use:
|
||||
* - liblzma >= 5.0.0: version = 0 is supported.
|
||||
* - liblzma >= 5.1.4beta: Support for version = 1 was added,
|
||||
* which adds the ignore_check field.
|
||||
*
|
||||
* If version is greater than one, most Block related functions
|
||||
* will return LZMA_OPTIONS_ERROR (lzma_block_header_decode() works
|
||||
* with any version value).
|
||||
* To prevent API and ABI breakages if new features are needed in
|
||||
* the Block field, a version number is used to indicate which
|
||||
* fields in this structure are in use. For now, version must always
|
||||
* be zero. With non-zero version, most Block related functions will
|
||||
* return LZMA_OPTIONS_ERROR.
|
||||
*
|
||||
* Read by:
|
||||
* - All functions that take pointer to lzma_block as argument,
|
||||
@@ -238,28 +233,7 @@ typedef struct {
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
lzma_reserved_enum reserved_enum3;
|
||||
lzma_reserved_enum reserved_enum4;
|
||||
|
||||
/**
|
||||
* \brief A flag to Block decoder to not verify the Check field
|
||||
*
|
||||
* This field is supported by liblzma >= 5.1.4beta if .version >= 1.
|
||||
*
|
||||
* If this is set to true, the integrity check won't be calculated
|
||||
* and verified. Unless you know what you are doing, you should
|
||||
* leave this to false. (A reason to set this to true is when the
|
||||
* file integrity is verified externally anyway and you want to
|
||||
* speed up the decompression, which matters mostly when using
|
||||
* SHA-256 as the integrity check.)
|
||||
*
|
||||
* If .version >= 1, read by:
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_decode()
|
||||
*
|
||||
* Written by (.version is ignored):
|
||||
* - lzma_block_header_decode() always sets this to false
|
||||
*/
|
||||
lzma_bool ignore_check;
|
||||
|
||||
lzma_bool reserved_bool1;
|
||||
lzma_bool reserved_bool2;
|
||||
lzma_bool reserved_bool3;
|
||||
lzma_bool reserved_bool4;
|
||||
@@ -336,14 +310,10 @@ extern LZMA_API(lzma_ret) lzma_block_header_encode(
|
||||
/**
|
||||
* \brief Decode Block Header
|
||||
*
|
||||
* block->version should (usually) be set to the highest value supported
|
||||
* by the application. If the application sets block->version to a value
|
||||
* higher than supported by the current liblzma version, this function will
|
||||
* downgrade block->version to the highest value supported by it. Thus one
|
||||
* should check the value of block->version after calling this function if
|
||||
* block->version was set to a non-zero value and the application doesn't
|
||||
* otherwise know that the liblzma version being used is new enough to
|
||||
* support the specified block->version.
|
||||
* block->version should be set to the highest value supported by the
|
||||
* application; currently the only possible version is zero. This function
|
||||
* will set version to the lowest value that still supports all the features
|
||||
* required by the Block Header.
|
||||
*
|
||||
* The size of the Block Header must have already been decoded with
|
||||
* lzma_block_header_size_decode() macro and stored to block->header_size.
|
||||
@@ -374,7 +344,7 @@ extern LZMA_API(lzma_ret) lzma_block_header_encode(
|
||||
* block->header_size is invalid or block->filters is NULL.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block,
|
||||
const lzma_allocator *allocator, const uint8_t *in)
|
||||
lzma_allocator *allocator, const uint8_t *in)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
@@ -523,25 +493,7 @@ extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size)
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_block_buffer_encode(
|
||||
lzma_block *block, const lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Single-call uncompressed .xz Block encoder
|
||||
*
|
||||
* This is like lzma_block_buffer_encode() except this doesn't try to
|
||||
* compress the data and instead encodes the data using LZMA2 uncompressed
|
||||
* chunks. The required output buffer size can be determined with
|
||||
* lzma_block_buffer_bound().
|
||||
*
|
||||
* Since the data won't be compressed, this function ignores block->filters.
|
||||
* This function doesn't take lzma_allocator because this function doesn't
|
||||
* allocate any memory from the heap.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block,
|
||||
lzma_block *block, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
@@ -575,7 +527,7 @@ extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block,
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_block_buffer_decode(
|
||||
lzma_block *block, const lzma_allocator *allocator,
|
||||
lzma_block *block, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
lzma_nothrow;
|
||||
|
||||
@@ -60,131 +60,6 @@
|
||||
#define LZMA_PRESET_EXTREME (UINT32_C(1) << 31)
|
||||
|
||||
|
||||
/**
|
||||
* \brief Multithreading options
|
||||
*/
|
||||
typedef struct {
|
||||
/**
|
||||
* \brief Flags
|
||||
*
|
||||
* Set this to zero if no flags are wanted.
|
||||
*
|
||||
* No flags are currently supported.
|
||||
*/
|
||||
uint32_t flags;
|
||||
|
||||
/**
|
||||
* \brief Number of worker threads to use
|
||||
*/
|
||||
uint32_t threads;
|
||||
|
||||
/**
|
||||
* \brief Maximum uncompressed size of a Block
|
||||
*
|
||||
* The encoder will start a new .xz Block every block_size bytes.
|
||||
* Using LZMA_FULL_FLUSH or LZMA_FULL_BARRIER with lzma_code()
|
||||
* the caller may tell liblzma to start a new Block earlier.
|
||||
*
|
||||
* With LZMA2, a recommended block size is 2-4 times the LZMA2
|
||||
* dictionary size. With very small dictionaries, it is recommended
|
||||
* to use at least 1 MiB block size for good compression ratio, even
|
||||
* if this is more than four times the dictionary size. Note that
|
||||
* these are only recommendations for typical use cases; feel free
|
||||
* to use other values. Just keep in mind that using a block size
|
||||
* less than the LZMA2 dictionary size is waste of RAM.
|
||||
*
|
||||
* Set this to 0 to let liblzma choose the block size depending
|
||||
* on the compression options. For LZMA2 it will be 3*dict_size
|
||||
* or 1 MiB, whichever is more.
|
||||
*
|
||||
* For each thread, about 3 * block_size bytes of memory will be
|
||||
* allocated. This may change in later liblzma versions. If so,
|
||||
* the memory usage will probably be reduced, not increased.
|
||||
*/
|
||||
uint64_t block_size;
|
||||
|
||||
/**
|
||||
* \brief Timeout to allow lzma_code() to return early
|
||||
*
|
||||
* Multithreading can make liblzma to consume input and produce
|
||||
* output in a very bursty way: it may first read a lot of input
|
||||
* to fill internal buffers, then no input or output occurs for
|
||||
* a while.
|
||||
*
|
||||
* In single-threaded mode, lzma_code() won't return until it has
|
||||
* either consumed all the input or filled the output buffer. If
|
||||
* this is done in multithreaded mode, it may cause a call
|
||||
* lzma_code() to take even tens of seconds, which isn't acceptable
|
||||
* in all applications.
|
||||
*
|
||||
* To avoid very long blocking times in lzma_code(), a timeout
|
||||
* (in milliseconds) may be set here. If lzma_code() would block
|
||||
* longer than this number of milliseconds, it will return with
|
||||
* LZMA_OK. Reasonable values are 100 ms or more. The xz command
|
||||
* line tool uses 300 ms.
|
||||
*
|
||||
* If long blocking times are fine for you, set timeout to a special
|
||||
* value of 0, which will disable the timeout mechanism and will make
|
||||
* lzma_code() block until all the input is consumed or the output
|
||||
* buffer has been filled.
|
||||
*
|
||||
* \note Even with a timeout, lzma_code() might sometimes take
|
||||
* somewhat long time to return. No timing guarantees
|
||||
* are made.
|
||||
*/
|
||||
uint32_t timeout;
|
||||
|
||||
/**
|
||||
* \brief Compression preset (level and possible flags)
|
||||
*
|
||||
* The preset is set just like with lzma_easy_encoder().
|
||||
* The preset is ignored if filters below is non-NULL.
|
||||
*/
|
||||
uint32_t preset;
|
||||
|
||||
/**
|
||||
* \brief Filter chain (alternative to a preset)
|
||||
*
|
||||
* If this is NULL, the preset above is used. Otherwise the preset
|
||||
* is ignored and the filter chain specified here is used.
|
||||
*/
|
||||
const lzma_filter *filters;
|
||||
|
||||
/**
|
||||
* \brief Integrity check type
|
||||
*
|
||||
* See check.h for available checks. The xz command line tool
|
||||
* defaults to LZMA_CHECK_CRC64, which is a good choice if you
|
||||
* are unsure.
|
||||
*/
|
||||
lzma_check check;
|
||||
|
||||
/*
|
||||
* Reserved space to allow possible future extensions without
|
||||
* breaking the ABI. You should not touch these, because the names
|
||||
* of these variables may change. These are and will never be used
|
||||
* with the currently supported options, so it is safe to leave these
|
||||
* uninitialized.
|
||||
*/
|
||||
lzma_reserved_enum reserved_enum1;
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
lzma_reserved_enum reserved_enum3;
|
||||
uint32_t reserved_int1;
|
||||
uint32_t reserved_int2;
|
||||
uint32_t reserved_int3;
|
||||
uint32_t reserved_int4;
|
||||
uint64_t reserved_int5;
|
||||
uint64_t reserved_int6;
|
||||
uint64_t reserved_int7;
|
||||
uint64_t reserved_int8;
|
||||
void *reserved_ptr1;
|
||||
void *reserved_ptr2;
|
||||
void *reserved_ptr3;
|
||||
void *reserved_ptr4;
|
||||
|
||||
} lzma_mt;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate approximate memory usage of easy encoder
|
||||
*
|
||||
@@ -290,8 +165,7 @@ extern LZMA_API(lzma_ret) lzma_easy_encoder(
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
|
||||
uint32_t preset, lzma_check check,
|
||||
const lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size,
|
||||
lzma_allocator *allocator, const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
|
||||
|
||||
|
||||
@@ -316,49 +190,6 @@ extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm,
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate approximate memory usage of multithreaded .xz encoder
|
||||
*
|
||||
* Since doing the encoding in threaded mode doesn't affect the memory
|
||||
* requirements of single-threaded decompressor, you can use
|
||||
* lzma_easy_decoder_memusage(options->preset) or
|
||||
* lzma_raw_decoder_memusage(options->filters) to calculate
|
||||
* the decompressor memory requirements.
|
||||
*
|
||||
* \param options Compression options
|
||||
*
|
||||
* \return Number of bytes of memory required for encoding with the
|
||||
* given options. If an error occurs, for example due to
|
||||
* unsupported preset or filter chain, UINT64_MAX is returned.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage(
|
||||
const lzma_mt *options) lzma_nothrow lzma_attr_pure;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initialize multithreaded .xz Stream encoder
|
||||
*
|
||||
* This provides the functionality of lzma_easy_encoder() and
|
||||
* lzma_stream_encoder() as a single function for multithreaded use.
|
||||
*
|
||||
* The supported actions for lzma_code() are LZMA_RUN, LZMA_FULL_FLUSH,
|
||||
* LZMA_FULL_BARRIER, and LZMA_FINISH. Support for LZMA_SYNC_FLUSH might be
|
||||
* added in the future.
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param options Pointer to multithreaded compression options
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_stream_encoder_mt(
|
||||
lzma_stream *strm, const lzma_mt *options)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initialize .lzma encoder (legacy file format)
|
||||
*
|
||||
@@ -438,8 +269,7 @@ extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
|
||||
lzma_filter *filters, lzma_check check,
|
||||
const lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size,
|
||||
lzma_allocator *allocator, const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
@@ -474,30 +304,6 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
|
||||
#define LZMA_TELL_ANY_CHECK UINT32_C(0x04)
|
||||
|
||||
|
||||
/**
|
||||
* This flag makes lzma_code() not calculate and verify the integrity check
|
||||
* of the compressed data in .xz files. This means that invalid integrity
|
||||
* check values won't be detected and LZMA_DATA_ERROR won't be returned in
|
||||
* such cases.
|
||||
*
|
||||
* This flag only affects the checks of the compressed data itself; the CRC32
|
||||
* values in the .xz headers will still be verified normally.
|
||||
*
|
||||
* Don't use this flag unless you know what you are doing. Possible reasons
|
||||
* to use this flag:
|
||||
*
|
||||
* - Trying to recover data from a corrupt .xz file.
|
||||
*
|
||||
* - Speeding up decompression, which matters mostly with SHA-256
|
||||
* or with files that have compressed extremely well. It's recommended
|
||||
* to not use this flag for this purpose unless the file integrity is
|
||||
* verified externally in some other way.
|
||||
*
|
||||
* Support for this flag was added in liblzma 5.1.4beta.
|
||||
*/
|
||||
#define LZMA_IGNORE_CHECK UINT32_C(0x10)
|
||||
|
||||
|
||||
/**
|
||||
* This flag enables decoding of concatenated files with file formats that
|
||||
* allow concatenating compressed files as is. From the formats currently
|
||||
@@ -612,8 +418,7 @@ extern LZMA_API(lzma_ret) lzma_alone_decoder(
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
|
||||
uint64_t *memlimit, uint32_t flags,
|
||||
const lzma_allocator *allocator,
|
||||
uint64_t *memlimit, uint32_t flags, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
@@ -116,9 +116,8 @@ extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id)
|
||||
* is not NULL.
|
||||
* - LZMA_PROG_ERROR: src or dest is NULL.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_filters_copy(
|
||||
const lzma_filter *src, lzma_filter *dest,
|
||||
const lzma_allocator *allocator) lzma_nothrow;
|
||||
extern LZMA_API(lzma_ret) lzma_filters_copy(const lzma_filter *src,
|
||||
lzma_filter *dest, lzma_allocator *allocator) lzma_nothrow;
|
||||
|
||||
|
||||
/**
|
||||
@@ -257,7 +256,7 @@ extern LZMA_API(lzma_ret) lzma_filters_update(
|
||||
* won't necessarily meet that bound.)
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
|
||||
const lzma_filter *filters, const lzma_allocator *allocator,
|
||||
const lzma_filter *filters, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size, uint8_t *out,
|
||||
size_t *out_pos, size_t out_size) lzma_nothrow;
|
||||
|
||||
@@ -281,7 +280,7 @@ extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
|
||||
* which no data is written to is out[out_size].
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_raw_buffer_decode(
|
||||
const lzma_filter *filters, const lzma_allocator *allocator,
|
||||
const lzma_filter *filters, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
|
||||
|
||||
@@ -357,7 +356,7 @@ extern LZMA_API(lzma_ret) lzma_properties_encode(
|
||||
* - LZMA_MEM_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_properties_decode(
|
||||
lzma_filter *filter, const lzma_allocator *allocator,
|
||||
lzma_filter *filter, lzma_allocator *allocator,
|
||||
const uint8_t *props, size_t props_size) lzma_nothrow;
|
||||
|
||||
|
||||
@@ -420,6 +419,6 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filter,
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_filter_flags_decode(
|
||||
lzma_filter *filter, const lzma_allocator *allocator,
|
||||
lzma_filter *filter, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
@@ -48,17 +48,3 @@
|
||||
* of RAM on the specific operating system.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get the number of processor cores or threads
|
||||
*
|
||||
* This function may be useful when determining how many threads to use.
|
||||
* If the hardware supports more than one thread per CPU core, the number
|
||||
* of hardware threads is returned if that information is available.
|
||||
*
|
||||
* \brief On success, the number of available CPU threads or cores is
|
||||
* returned. If this information isn't available or an error
|
||||
* occurs, zero is returned.
|
||||
*/
|
||||
extern LZMA_API(uint32_t) lzma_cputhreads(void) lzma_nothrow;
|
||||
|
||||
@@ -303,7 +303,7 @@ extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i)
|
||||
* \return On success, a pointer to an empty initialized lzma_index is
|
||||
* returned. If allocation fails, NULL is returned.
|
||||
*/
|
||||
extern LZMA_API(lzma_index *) lzma_index_init(const lzma_allocator *allocator)
|
||||
extern LZMA_API(lzma_index *) lzma_index_init(lzma_allocator *allocator)
|
||||
lzma_nothrow;
|
||||
|
||||
|
||||
@@ -312,8 +312,8 @@ extern LZMA_API(lzma_index *) lzma_index_init(const lzma_allocator *allocator)
|
||||
*
|
||||
* If i is NULL, this does nothing.
|
||||
*/
|
||||
extern LZMA_API(void) lzma_index_end(
|
||||
lzma_index *i, const lzma_allocator *allocator) lzma_nothrow;
|
||||
extern LZMA_API(void) lzma_index_end(lzma_index *i, lzma_allocator *allocator)
|
||||
lzma_nothrow;
|
||||
|
||||
|
||||
/**
|
||||
@@ -341,7 +341,7 @@ extern LZMA_API(void) lzma_index_end(
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_index_append(
|
||||
lzma_index *i, const lzma_allocator *allocator,
|
||||
lzma_index *i, lzma_allocator *allocator,
|
||||
lzma_vli unpadded_size, lzma_vli uncompressed_size)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
@@ -564,8 +564,8 @@ extern LZMA_API(lzma_bool) lzma_index_iter_locate(
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_index_cat(lzma_index *dest, lzma_index *src,
|
||||
const lzma_allocator *allocator)
|
||||
extern LZMA_API(lzma_ret) lzma_index_cat(
|
||||
lzma_index *dest, lzma_index *src, lzma_allocator *allocator)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
@@ -575,7 +575,7 @@ extern LZMA_API(lzma_ret) lzma_index_cat(lzma_index *dest, lzma_index *src,
|
||||
* \return A copy of the lzma_index, or NULL if memory allocation failed.
|
||||
*/
|
||||
extern LZMA_API(lzma_index *) lzma_index_dup(
|
||||
const lzma_index *i, const lzma_allocator *allocator)
|
||||
const lzma_index *i, lzma_allocator *allocator)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
@@ -677,6 +677,6 @@ extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i,
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
|
||||
uint64_t *memlimit, const lzma_allocator *allocator,
|
||||
uint64_t *memlimit, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size)
|
||||
lzma_nothrow;
|
||||
|
||||
@@ -37,7 +37,7 @@ typedef struct lzma_index_hash_s lzma_index_hash;
|
||||
* pointer than the index_hash that was given as an argument.
|
||||
*/
|
||||
extern LZMA_API(lzma_index_hash *) lzma_index_hash_init(
|
||||
lzma_index_hash *index_hash, const lzma_allocator *allocator)
|
||||
lzma_index_hash *index_hash, lzma_allocator *allocator)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ extern LZMA_API(lzma_index_hash *) lzma_index_hash_init(
|
||||
* \brief Deallocate lzma_index_hash structure
|
||||
*/
|
||||
extern LZMA_API(void) lzma_index_hash_end(
|
||||
lzma_index_hash *index_hash, const lzma_allocator *allocator)
|
||||
lzma_index_hash *index_hash, lzma_allocator *allocator)
|
||||
lzma_nothrow;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* \file lzma/lzma12.h
|
||||
* \file lzma/lzma.h
|
||||
* \brief LZMA1 and LZMA2 filters
|
||||
*/
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
* Version number split into components
|
||||
*/
|
||||
#define LZMA_VERSION_MAJOR 5
|
||||
#define LZMA_VERSION_MINOR 2
|
||||
#define LZMA_VERSION_PATCH 2
|
||||
#define LZMA_VERSION_MINOR 0
|
||||
#define LZMA_VERSION_PATCH 8
|
||||
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
|
||||
|
||||
#ifndef LZMA_VERSION_COMMIT
|
||||
|
||||
@@ -47,7 +47,5 @@ endif
|
||||
endif
|
||||
|
||||
if COND_CHECK_SHA256
|
||||
if COND_INTERNAL_SHA256
|
||||
liblzma_la_SOURCES += check/sha256.c
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -15,43 +15,6 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#if defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
|
||||
# include <CommonCrypto/CommonDigest.h>
|
||||
#elif defined(HAVE_SHA256_H)
|
||||
# include <sys/types.h>
|
||||
# include <sha256.h>
|
||||
#elif defined(HAVE_SHA2_H)
|
||||
# include <sys/types.h>
|
||||
# include <sha2.h>
|
||||
#elif defined(HAVE_MINIX_SHA2_H)
|
||||
# include <sys/types.h>
|
||||
# include <minix/sha2.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_CC_SHA256_CTX)
|
||||
typedef CC_SHA256_CTX lzma_sha256_state;
|
||||
#elif defined(HAVE_SHA256_CTX)
|
||||
typedef SHA256_CTX lzma_sha256_state;
|
||||
#elif defined(HAVE_SHA2_CTX)
|
||||
typedef SHA2_CTX lzma_sha256_state;
|
||||
#else
|
||||
/// State for the internal SHA-256 implementation
|
||||
typedef struct {
|
||||
/// Internal state
|
||||
uint32_t state[8];
|
||||
|
||||
/// Size of the message excluding padding
|
||||
uint64_t size;
|
||||
} lzma_sha256_state;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_CC_SHA256_INIT)
|
||||
# define LZMA_SHA256FUNC(x) CC_SHA256_ ## x
|
||||
#elif defined(HAVE_SHA256_INIT)
|
||||
# define LZMA_SHA256FUNC(x) SHA256_ ## x
|
||||
#elif defined(HAVE_SHA256INIT)
|
||||
# define LZMA_SHA256FUNC(x) SHA256 ## x
|
||||
#endif
|
||||
|
||||
// Index hashing needs the best possible hash function (preferably
|
||||
// a cryptographic hash) for maximum reliability.
|
||||
@@ -80,7 +43,14 @@ typedef struct {
|
||||
union {
|
||||
uint32_t crc32;
|
||||
uint64_t crc64;
|
||||
lzma_sha256_state sha256;
|
||||
|
||||
struct {
|
||||
/// Internal state
|
||||
uint32_t state[8];
|
||||
|
||||
/// Size of the message excluding padding
|
||||
uint64_t size;
|
||||
} sha256;
|
||||
} state;
|
||||
|
||||
} lzma_check_state;
|
||||
@@ -112,8 +82,6 @@ extern void lzma_check_update(lzma_check_state *check, lzma_check type,
|
||||
extern void lzma_check_finish(lzma_check_state *check, lzma_check type);
|
||||
|
||||
|
||||
#ifndef LZMA_SHA256FUNC
|
||||
|
||||
/// Prepare SHA-256 state for new input.
|
||||
extern void lzma_sha256_init(lzma_check_state *check);
|
||||
|
||||
@@ -124,39 +92,4 @@ extern void lzma_sha256_update(
|
||||
/// Finish the SHA-256 calculation and store the result to check->buffer.u8.
|
||||
extern void lzma_sha256_finish(lzma_check_state *check);
|
||||
|
||||
|
||||
#else
|
||||
|
||||
static inline void
|
||||
lzma_sha256_init(lzma_check_state *check)
|
||||
{
|
||||
LZMA_SHA256FUNC(Init)(&check->state.sha256);
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
lzma_sha256_update(const uint8_t *buf, size_t size, lzma_check_state *check)
|
||||
{
|
||||
#if defined(HAVE_CC_SHA256_INIT) && SIZE_MAX > UINT32_MAX
|
||||
// Darwin's CC_SHA256_Update takes uint32_t as the buffer size,
|
||||
// so use a loop to support size_t.
|
||||
while (size > UINT32_MAX) {
|
||||
LZMA_SHA256FUNC(Update)(&check->state.sha256, buf, UINT32_MAX);
|
||||
buf += UINT32_MAX;
|
||||
size -= UINT32_MAX;
|
||||
}
|
||||
#endif
|
||||
|
||||
LZMA_SHA256FUNC(Update)(&check->state.sha256, buf, size);
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
lzma_sha256_finish(lzma_check_state *check)
|
||||
{
|
||||
LZMA_SHA256FUNC(Final)(check->buffer.u8, &check->state.sha256);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,22 +21,22 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Avoid bogus warnings in transform().
|
||||
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || __GNUC__ > 4
|
||||
# pragma GCC diagnostic ignored "-Wuninitialized"
|
||||
#endif
|
||||
|
||||
#include "check.h"
|
||||
|
||||
// Rotate a uint32_t. GCC can optimize this to a rotate instruction
|
||||
// at least on x86.
|
||||
static inline uint32_t
|
||||
rotr_32(uint32_t num, unsigned amount)
|
||||
{
|
||||
return (num >> amount) | (num << (32 - amount));
|
||||
}
|
||||
// At least on x86, GCC is able to optimize this to a rotate instruction.
|
||||
#define rotr_32(num, amount) ((num) >> (amount) | (num) << (32 - (amount)))
|
||||
|
||||
#define blk0(i) (W[i] = conv32be(data[i]))
|
||||
#define blk0(i) (W[i] = data[i])
|
||||
#define blk2(i) (W[i & 15] += s1(W[(i - 2) & 15]) + W[(i - 7) & 15] \
|
||||
+ s0(W[(i - 15) & 15]))
|
||||
|
||||
#define Ch(x, y, z) (z ^ (x & (y ^ z)))
|
||||
#define Maj(x, y, z) ((x & (y ^ z)) + (y & z))
|
||||
#define Maj(x, y, z) ((x & y) | (z & (x | y)))
|
||||
|
||||
#define a(i) T[(0 - i) & 7]
|
||||
#define b(i) T[(1 - i) & 7]
|
||||
@@ -47,17 +47,16 @@ rotr_32(uint32_t num, unsigned amount)
|
||||
#define g(i) T[(6 - i) & 7]
|
||||
#define h(i) T[(7 - i) & 7]
|
||||
|
||||
#define R(i, j, blk) \
|
||||
h(i) += S1(e(i)) + Ch(e(i), f(i), g(i)) + SHA256_K[i + j] + blk; \
|
||||
#define R(i) \
|
||||
h(i) += S1(e(i)) + Ch(e(i), f(i), g(i)) + SHA256_K[i + j] \
|
||||
+ (j ? blk2(i) : blk0(i)); \
|
||||
d(i) += h(i); \
|
||||
h(i) += S0(a(i)) + Maj(a(i), b(i), c(i))
|
||||
#define R0(i) R(i, 0, blk0(i))
|
||||
#define R2(i) R(i, j, blk2(i))
|
||||
|
||||
#define S0(x) rotr_32(x ^ rotr_32(x ^ rotr_32(x, 9), 11), 2)
|
||||
#define S1(x) rotr_32(x ^ rotr_32(x ^ rotr_32(x, 14), 5), 6)
|
||||
#define s0(x) (rotr_32(x ^ rotr_32(x, 11), 7) ^ (x >> 3))
|
||||
#define s1(x) (rotr_32(x ^ rotr_32(x, 2), 17) ^ (x >> 10))
|
||||
#define S0(x) (rotr_32(x, 2) ^ rotr_32(x, 13) ^ rotr_32(x, 22))
|
||||
#define S1(x) (rotr_32(x, 6) ^ rotr_32(x, 11) ^ rotr_32(x, 25))
|
||||
#define s0(x) (rotr_32(x, 7) ^ rotr_32(x, 18) ^ (x >> 3))
|
||||
#define s1(x) (rotr_32(x, 17) ^ rotr_32(x, 19) ^ (x >> 10))
|
||||
|
||||
|
||||
static const uint32_t SHA256_K[64] = {
|
||||
@@ -89,18 +88,12 @@ transform(uint32_t state[8], const uint32_t data[16])
|
||||
// Copy state[] to working vars.
|
||||
memcpy(T, state, sizeof(T));
|
||||
|
||||
// The first 16 operations unrolled
|
||||
R0( 0); R0( 1); R0( 2); R0( 3);
|
||||
R0( 4); R0( 5); R0( 6); R0( 7);
|
||||
R0( 8); R0( 9); R0(10); R0(11);
|
||||
R0(12); R0(13); R0(14); R0(15);
|
||||
|
||||
// The remaining 48 operations partially unrolled
|
||||
for (unsigned int j = 16; j < 64; j += 16) {
|
||||
R2( 0); R2( 1); R2( 2); R2( 3);
|
||||
R2( 4); R2( 5); R2( 6); R2( 7);
|
||||
R2( 8); R2( 9); R2(10); R2(11);
|
||||
R2(12); R2(13); R2(14); R2(15);
|
||||
// 64 operations, partially loop unrolled
|
||||
for (unsigned int j = 0; j < 64; j += 16) {
|
||||
R( 0); R( 1); R( 2); R( 3);
|
||||
R( 4); R( 5); R( 6); R( 7);
|
||||
R( 8); R( 9); R(10); R(11);
|
||||
R(12); R(13); R(14); R(15);
|
||||
}
|
||||
|
||||
// Add the working vars back into state[].
|
||||
@@ -118,7 +111,18 @@ transform(uint32_t state[8], const uint32_t data[16])
|
||||
static void
|
||||
process(lzma_check_state *check)
|
||||
{
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
transform(check->state.sha256.state, check->buffer.u32);
|
||||
|
||||
#else
|
||||
uint32_t data[16];
|
||||
|
||||
for (size_t i = 0; i < 16; ++i)
|
||||
data[i] = bswap32(check->buffer.u32[i]);
|
||||
|
||||
transform(check->state.sha256.state, data);
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
liblzma_la_SOURCES += \
|
||||
common/common.c \
|
||||
common/common.h \
|
||||
common/memcmplen.h \
|
||||
common/block_util.c \
|
||||
common/easy_preset.c \
|
||||
common/easy_preset.h \
|
||||
@@ -25,7 +24,6 @@ if COND_MAIN_ENCODER
|
||||
liblzma_la_SOURCES += \
|
||||
common/alone_encoder.c \
|
||||
common/block_buffer_encoder.c \
|
||||
common/block_buffer_encoder.h \
|
||||
common/block_encoder.c \
|
||||
common/block_encoder.h \
|
||||
common/block_header_encoder.c \
|
||||
@@ -40,16 +38,9 @@ liblzma_la_SOURCES += \
|
||||
common/index_encoder.h \
|
||||
common/stream_buffer_encoder.c \
|
||||
common/stream_encoder.c \
|
||||
common/stream_encoder.h \
|
||||
common/stream_flags_encoder.c \
|
||||
common/vli_encoder.c
|
||||
|
||||
if COND_THREADS
|
||||
liblzma_la_SOURCES += \
|
||||
common/hardware_cputhreads.c \
|
||||
common/outqueue.c \
|
||||
common/outqueue.h \
|
||||
common/stream_encoder_mt.c
|
||||
endif
|
||||
endif
|
||||
|
||||
if COND_MAIN_DECODER
|
||||
|
||||
@@ -51,7 +51,7 @@ struct lzma_coder_s {
|
||||
|
||||
static lzma_ret
|
||||
alone_decode(lzma_coder *coder,
|
||||
const lzma_allocator *allocator lzma_attribute((__unused__)),
|
||||
lzma_allocator *allocator lzma_attribute((__unused__)),
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size,
|
||||
@@ -166,7 +166,7 @@ alone_decode(lzma_coder *coder,
|
||||
|
||||
|
||||
static void
|
||||
alone_decoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
alone_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
lzma_next_end(&coder->next, allocator);
|
||||
lzma_free(coder, allocator);
|
||||
@@ -193,7 +193,7 @@ alone_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_alone_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_alone_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
uint64_t memlimit, bool picky)
|
||||
{
|
||||
lzma_next_coder_init(&lzma_alone_decoder_init, next, allocator);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
extern lzma_ret lzma_alone_decoder_init(
|
||||
lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_next_coder *next, lzma_allocator *allocator,
|
||||
uint64_t memlimit, bool picky);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,7 @@ struct lzma_coder_s {
|
||||
|
||||
static lzma_ret
|
||||
alone_encode(lzma_coder *coder,
|
||||
const lzma_allocator *allocator lzma_attribute((__unused__)),
|
||||
lzma_allocator *allocator lzma_attribute((__unused__)),
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size,
|
||||
@@ -65,7 +65,7 @@ alone_encode(lzma_coder *coder,
|
||||
|
||||
|
||||
static void
|
||||
alone_encoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
alone_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
lzma_next_end(&coder->next, allocator);
|
||||
lzma_free(coder, allocator);
|
||||
@@ -75,7 +75,7 @@ alone_encoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
|
||||
// At least for now, this is not used by any internal function.
|
||||
static lzma_ret
|
||||
alone_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
alone_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_options_lzma *options)
|
||||
{
|
||||
lzma_next_coder_init(&alone_encoder_init, next, allocator);
|
||||
@@ -137,7 +137,7 @@ alone_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
|
||||
/*
|
||||
extern lzma_ret
|
||||
lzma_alone_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_alone_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_options_alone *options)
|
||||
{
|
||||
lzma_next_coder_init(&alone_encoder_init, next, allocator, options);
|
||||
|
||||
@@ -30,7 +30,7 @@ struct lzma_coder_s {
|
||||
|
||||
|
||||
static lzma_ret
|
||||
auto_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
auto_decode(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size, lzma_action action)
|
||||
@@ -100,7 +100,7 @@ auto_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
static void
|
||||
auto_decoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
auto_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
lzma_next_end(&coder->next, allocator);
|
||||
lzma_free(coder, allocator);
|
||||
@@ -143,7 +143,7 @@ auto_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
|
||||
|
||||
|
||||
static lzma_ret
|
||||
auto_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
auto_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
uint64_t memlimit, uint32_t flags)
|
||||
{
|
||||
lzma_next_coder_init(&auto_decoder_init, next, allocator);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_block_buffer_decode(lzma_block *block, const lzma_allocator *allocator,
|
||||
lzma_block_buffer_decode(lzma_block *block, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "block_buffer_encoder.h"
|
||||
#include "block_encoder.h"
|
||||
#include "filter_encoder.h"
|
||||
#include "lzma2_encoder.h"
|
||||
@@ -29,8 +28,8 @@
|
||||
+ LZMA_CHECK_SIZE_MAX + 3) & ~3)
|
||||
|
||||
|
||||
static uint64_t
|
||||
lzma2_bound(uint64_t uncompressed_size)
|
||||
static lzma_vli
|
||||
lzma2_bound(lzma_vli uncompressed_size)
|
||||
{
|
||||
// Prevent integer overflow in overhead calculation.
|
||||
if (uncompressed_size > COMPRESSED_SIZE_MAX)
|
||||
@@ -40,7 +39,7 @@ lzma2_bound(uint64_t uncompressed_size)
|
||||
// uncompressed_size up to the next multiple of LZMA2_CHUNK_MAX,
|
||||
// multiply by the size of per-chunk header, and add one byte for
|
||||
// the end marker.
|
||||
const uint64_t overhead = ((uncompressed_size + LZMA2_CHUNK_MAX - 1)
|
||||
const lzma_vli overhead = ((uncompressed_size + LZMA2_CHUNK_MAX - 1)
|
||||
/ LZMA2_CHUNK_MAX)
|
||||
* LZMA2_HEADER_UNCOMPRESSED + 1;
|
||||
|
||||
@@ -52,36 +51,30 @@ lzma2_bound(uint64_t uncompressed_size)
|
||||
}
|
||||
|
||||
|
||||
extern uint64_t
|
||||
lzma_block_buffer_bound64(uint64_t uncompressed_size)
|
||||
extern LZMA_API(size_t)
|
||||
lzma_block_buffer_bound(size_t uncompressed_size)
|
||||
{
|
||||
// If the data doesn't compress, we always use uncompressed
|
||||
// LZMA2 chunks.
|
||||
uint64_t lzma2_size = lzma2_bound(uncompressed_size);
|
||||
// For now, if the data doesn't compress, we always use uncompressed
|
||||
// chunks of LZMA2. In future we may use Subblock filter too, but
|
||||
// but for simplicity we probably will still use the same bound
|
||||
// calculation even though Subblock filter would have slightly less
|
||||
// overhead.
|
||||
lzma_vli lzma2_size = lzma2_bound(uncompressed_size);
|
||||
if (lzma2_size == 0)
|
||||
return 0;
|
||||
|
||||
// Take Block Padding into account.
|
||||
lzma2_size = (lzma2_size + 3) & ~UINT64_C(3);
|
||||
lzma2_size = (lzma2_size + 3) & ~LZMA_VLI_C(3);
|
||||
|
||||
// No risk of integer overflow because lzma2_bound() already takes
|
||||
#if SIZE_MAX < LZMA_VLI_MAX
|
||||
// Catch the possible integer overflow on 32-bit systems. There's no
|
||||
// overflow on 64-bit systems, because lzma2_bound() already takes
|
||||
// into account the size of the headers in the Block.
|
||||
return HEADERS_BOUND + lzma2_size;
|
||||
}
|
||||
|
||||
|
||||
extern LZMA_API(size_t)
|
||||
lzma_block_buffer_bound(size_t uncompressed_size)
|
||||
{
|
||||
uint64_t ret = lzma_block_buffer_bound64(uncompressed_size);
|
||||
|
||||
#if SIZE_MAX < UINT64_MAX
|
||||
// Catch the possible integer overflow on 32-bit systems.
|
||||
if (ret > SIZE_MAX)
|
||||
if (SIZE_MAX - HEADERS_BOUND < lzma2_size)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
return HEADERS_BOUND + lzma2_size;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +82,9 @@ static lzma_ret
|
||||
block_encode_uncompressed(lzma_block *block, const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
{
|
||||
// TODO: Figure out if the last filter is LZMA2 or Subblock and use
|
||||
// that filter to encode the uncompressed chunks.
|
||||
|
||||
// Use LZMA2 uncompressed chunks. We wouldn't need a dictionary at
|
||||
// all, but LZMA2 always requires a dictionary, so use the minimum
|
||||
// value to minimize memory usage of the decoder.
|
||||
@@ -164,11 +160,16 @@ block_encode_uncompressed(lzma_block *block, const uint8_t *in, size_t in_size,
|
||||
|
||||
|
||||
static lzma_ret
|
||||
block_encode_normal(lzma_block *block, const lzma_allocator *allocator,
|
||||
block_encode_normal(lzma_block *block, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
{
|
||||
// Find out the size of the Block Header.
|
||||
block->compressed_size = lzma2_bound(in_size);
|
||||
if (block->compressed_size == 0)
|
||||
return LZMA_DATA_ERROR;
|
||||
|
||||
block->uncompressed_size = in_size;
|
||||
return_if_error(lzma_block_header_size(block));
|
||||
|
||||
// Reserve space for the Block Header and skip it for now.
|
||||
@@ -220,11 +221,10 @@ block_encode_normal(lzma_block *block, const lzma_allocator *allocator,
|
||||
}
|
||||
|
||||
|
||||
static lzma_ret
|
||||
block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_block_buffer_encode(lzma_block *block, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size,
|
||||
bool try_to_compress)
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
{
|
||||
// Validate the arguments.
|
||||
if (block == NULL || (in == NULL && in_size != 0) || out == NULL
|
||||
@@ -233,11 +233,11 @@ block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
|
||||
|
||||
// The contents of the structure may depend on the version so
|
||||
// check the version before validating the contents of *block.
|
||||
if (block->version > 1)
|
||||
if (block->version != 0)
|
||||
return LZMA_OPTIONS_ERROR;
|
||||
|
||||
if ((unsigned int)(block->check) > LZMA_CHECK_ID_MAX
|
||||
|| (try_to_compress && block->filters == NULL))
|
||||
|| block->filters == NULL)
|
||||
return LZMA_PROG_ERROR;
|
||||
|
||||
if (!lzma_check_is_supported(block->check))
|
||||
@@ -258,19 +258,9 @@ block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
|
||||
|
||||
out_size -= check_size;
|
||||
|
||||
// Initialize block->uncompressed_size and calculate the worst-case
|
||||
// value for block->compressed_size.
|
||||
block->uncompressed_size = in_size;
|
||||
block->compressed_size = lzma2_bound(in_size);
|
||||
if (block->compressed_size == 0)
|
||||
return LZMA_DATA_ERROR;
|
||||
|
||||
// Do the actual compression.
|
||||
lzma_ret ret = LZMA_BUF_ERROR;
|
||||
if (try_to_compress)
|
||||
ret = block_encode_normal(block, allocator,
|
||||
in, in_size, out, out_pos, out_size);
|
||||
|
||||
const lzma_ret ret = block_encode_normal(block, allocator,
|
||||
in, in_size, out, out_pos, out_size);
|
||||
if (ret != LZMA_OK) {
|
||||
// If the error was something else than output buffer
|
||||
// becoming full, return the error now.
|
||||
@@ -313,25 +303,3 @@ block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
|
||||
|
||||
return LZMA_OK;
|
||||
}
|
||||
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
{
|
||||
return block_buffer_encode(block, allocator,
|
||||
in, in_size, out, out_pos, out_size, true);
|
||||
}
|
||||
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_block_uncomp_encode(lzma_block *block,
|
||||
const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
{
|
||||
// It won't allocate any memory from heap so no need
|
||||
// for lzma_allocator.
|
||||
return block_buffer_encode(block, NULL,
|
||||
in, in_size, out, out_pos, out_size, false);
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file block_buffer_encoder.h
|
||||
/// \brief Single-call .xz Block encoder
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LZMA_BLOCK_BUFFER_ENCODER_H
|
||||
#define LZMA_BLOCK_BUFFER_ENCODER_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
||||
/// uint64_t version of lzma_block_buffer_bound(). It is used by
|
||||
/// stream_encoder_mt.c. Probably the original lzma_block_buffer_bound()
|
||||
/// should have been 64-bit, but fixing it would break the ABI.
|
||||
extern uint64_t lzma_block_buffer_bound64(uint64_t uncompressed_size);
|
||||
|
||||
#endif
|
||||
@@ -45,9 +45,6 @@ struct lzma_coder_s {
|
||||
|
||||
/// Check of the uncompressed data
|
||||
lzma_check_state check;
|
||||
|
||||
/// True if the integrity check won't be calculated and verified.
|
||||
bool ignore_check;
|
||||
};
|
||||
|
||||
|
||||
@@ -74,7 +71,7 @@ is_size_valid(lzma_vli size, lzma_vli reference)
|
||||
|
||||
|
||||
static lzma_ret
|
||||
block_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
block_decode(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size, lzma_action action)
|
||||
@@ -100,9 +97,8 @@ block_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
coder->block->uncompressed_size))
|
||||
return LZMA_DATA_ERROR;
|
||||
|
||||
if (!coder->ignore_check)
|
||||
lzma_check_update(&coder->check, coder->block->check,
|
||||
out + out_start, out_used);
|
||||
lzma_check_update(&coder->check, coder->block->check,
|
||||
out + out_start, out_used);
|
||||
|
||||
if (ret != LZMA_STREAM_END)
|
||||
return ret;
|
||||
@@ -144,9 +140,7 @@ block_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
if (coder->block->check == LZMA_CHECK_NONE)
|
||||
return LZMA_STREAM_END;
|
||||
|
||||
if (!coder->ignore_check)
|
||||
lzma_check_finish(&coder->check, coder->block->check);
|
||||
|
||||
lzma_check_finish(&coder->check, coder->block->check);
|
||||
coder->sequence = SEQ_CHECK;
|
||||
|
||||
// Fall through
|
||||
@@ -161,8 +155,7 @@ block_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
// Validate the Check only if we support it.
|
||||
// coder->check.buffer may be uninitialized
|
||||
// when the Check ID is not supported.
|
||||
if (!coder->ignore_check
|
||||
&& lzma_check_is_supported(coder->block->check)
|
||||
if (lzma_check_is_supported(coder->block->check)
|
||||
&& memcmp(coder->block->raw_check,
|
||||
coder->check.buffer.u8,
|
||||
check_size) != 0)
|
||||
@@ -177,7 +170,7 @@ block_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
static void
|
||||
block_decoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
block_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
lzma_next_end(&coder->next, allocator);
|
||||
lzma_free(coder, allocator);
|
||||
@@ -186,7 +179,7 @@ block_decoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_block_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_block_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
lzma_block *block)
|
||||
{
|
||||
lzma_next_coder_init(&lzma_block_decoder_init, next, allocator);
|
||||
@@ -231,9 +224,6 @@ lzma_block_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
next->coder->check_pos = 0;
|
||||
lzma_check_init(&next->coder->check, block->check);
|
||||
|
||||
next->coder->ignore_check = block->version >= 1
|
||||
? block->ignore_check : false;
|
||||
|
||||
// Initialize the filter chain.
|
||||
return lzma_raw_decoder_init(&next->coder->next, allocator,
|
||||
block->filters);
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
|
||||
|
||||
extern lzma_ret lzma_block_decoder_init(lzma_next_coder *next,
|
||||
const lzma_allocator *allocator, lzma_block *block);
|
||||
lzma_allocator *allocator, lzma_block *block);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@ struct lzma_coder_s {
|
||||
|
||||
|
||||
static lzma_ret
|
||||
block_encode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
block_encode(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size, lzma_action action)
|
||||
@@ -134,7 +134,7 @@ block_encode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
static void
|
||||
block_encoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
block_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
lzma_next_end(&coder->next, allocator);
|
||||
lzma_free(coder, allocator);
|
||||
@@ -143,7 +143,7 @@ block_encoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
|
||||
|
||||
static lzma_ret
|
||||
block_encoder_update(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
block_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const lzma_filter *filters lzma_attribute((__unused__)),
|
||||
const lzma_filter *reversed_filters)
|
||||
{
|
||||
@@ -156,7 +156,7 @@ block_encoder_update(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_block_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_block_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
lzma_block *block)
|
||||
{
|
||||
lzma_next_coder_init(&lzma_block_encoder_init, next, allocator);
|
||||
@@ -166,7 +166,7 @@ lzma_block_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
|
||||
// The contents of the structure may depend on the version so
|
||||
// check the version first.
|
||||
if (block->version > 1)
|
||||
if (block->version != 0)
|
||||
return LZMA_OPTIONS_ERROR;
|
||||
|
||||
// If the Check ID is not supported, we cannot calculate the check and
|
||||
|
||||
@@ -42,6 +42,6 @@
|
||||
|
||||
|
||||
extern lzma_ret lzma_block_encoder_init(lzma_next_coder *next,
|
||||
const lzma_allocator *allocator, lzma_block *block);
|
||||
lzma_allocator *allocator, lzma_block *block);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
static void
|
||||
free_properties(lzma_block *block, const lzma_allocator *allocator)
|
||||
free_properties(lzma_block *block, lzma_allocator *allocator)
|
||||
{
|
||||
// Free allocated filter options. The last array member is not
|
||||
// touched after the initialization in the beginning of
|
||||
@@ -32,7 +32,7 @@ free_properties(lzma_block *block, const lzma_allocator *allocator)
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_block_header_decode(lzma_block *block,
|
||||
const lzma_allocator *allocator, const uint8_t *in)
|
||||
lzma_allocator *allocator, const uint8_t *in)
|
||||
{
|
||||
// NOTE: We consider the header to be corrupt not only when the
|
||||
// CRC32 doesn't match, but also when variable-length integers
|
||||
@@ -46,16 +46,8 @@ lzma_block_header_decode(lzma_block *block,
|
||||
block->filters[i].options = NULL;
|
||||
}
|
||||
|
||||
// Versions 0 and 1 are supported. If a newer version was specified,
|
||||
// we need to downgrade it.
|
||||
if (block->version > 1)
|
||||
block->version = 1;
|
||||
|
||||
// This isn't a Block Header option, but since the decompressor will
|
||||
// read it if version >= 1, it's better to initialize it here than
|
||||
// to expect the caller to do it since in almost all cases this
|
||||
// should be false.
|
||||
block->ignore_check = false;
|
||||
// Always zero for now.
|
||||
block->version = 0;
|
||||
|
||||
// Validate Block Header Size and Check type. The caller must have
|
||||
// already set these, so it is a programming error if this test fails.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_block_header_size(lzma_block *block)
|
||||
{
|
||||
if (block->version > 1)
|
||||
if (block->version != 0)
|
||||
return LZMA_OPTIONS_ERROR;
|
||||
|
||||
// Block Header Size + Block Flags + CRC32.
|
||||
|
||||
@@ -51,7 +51,7 @@ lzma_block_unpadded_size(const lzma_block *block)
|
||||
// NOTE: This function is used for validation too, so it is
|
||||
// essential that these checks are always done even if
|
||||
// Compressed Size is unknown.
|
||||
if (block == NULL || block->version > 1
|
||||
if (block == NULL || block->version != 0
|
||||
|| block->header_size < LZMA_BLOCK_HEADER_SIZE_MIN
|
||||
|| block->header_size > LZMA_BLOCK_HEADER_SIZE_MAX
|
||||
|| (block->header_size & 3)
|
||||
|
||||
@@ -36,7 +36,7 @@ lzma_version_string(void)
|
||||
///////////////////////
|
||||
|
||||
extern void * lzma_attribute((__malloc__)) lzma_attr_alloc_size(1)
|
||||
lzma_alloc(size_t size, const lzma_allocator *allocator)
|
||||
lzma_alloc(size_t size, lzma_allocator *allocator)
|
||||
{
|
||||
// Some malloc() variants return NULL if called with size == 0.
|
||||
if (size == 0)
|
||||
@@ -53,29 +53,8 @@ lzma_alloc(size_t size, const lzma_allocator *allocator)
|
||||
}
|
||||
|
||||
|
||||
extern void * lzma_attribute((__malloc__)) lzma_attr_alloc_size(1)
|
||||
lzma_alloc_zero(size_t size, const lzma_allocator *allocator)
|
||||
{
|
||||
// Some calloc() variants return NULL if called with size == 0.
|
||||
if (size == 0)
|
||||
size = 1;
|
||||
|
||||
void *ptr;
|
||||
|
||||
if (allocator != NULL && allocator->alloc != NULL) {
|
||||
ptr = allocator->alloc(allocator->opaque, 1, size);
|
||||
if (ptr != NULL)
|
||||
memzero(ptr, size);
|
||||
} else {
|
||||
ptr = calloc(1, size);
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
extern void
|
||||
lzma_free(void *ptr, const lzma_allocator *allocator)
|
||||
lzma_free(void *ptr, lzma_allocator *allocator)
|
||||
{
|
||||
if (allocator != NULL && allocator->free != NULL)
|
||||
allocator->free(allocator->opaque, ptr);
|
||||
@@ -109,7 +88,7 @@ lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_next_filter_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_next_filter_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter_info *filters)
|
||||
{
|
||||
lzma_next_coder_init(filters[0].init, next, allocator);
|
||||
@@ -120,7 +99,7 @@ lzma_next_filter_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_next_filter_update(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_next_filter_update(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter *reversed_filters)
|
||||
{
|
||||
// Check that the application isn't trying to change the Filter ID.
|
||||
@@ -138,7 +117,7 @@ lzma_next_filter_update(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
extern void
|
||||
lzma_next_end(lzma_next_coder *next, const lzma_allocator *allocator)
|
||||
lzma_next_end(lzma_next_coder *next, lzma_allocator *allocator)
|
||||
{
|
||||
if (next->init != (uintptr_t)(NULL)) {
|
||||
// To avoid tiny end functions that simply call
|
||||
@@ -177,8 +156,10 @@ lzma_strm_init(lzma_stream *strm)
|
||||
strm->internal->next = LZMA_NEXT_CODER_INIT;
|
||||
}
|
||||
|
||||
memzero(strm->internal->supported_actions,
|
||||
sizeof(strm->internal->supported_actions));
|
||||
strm->internal->supported_actions[LZMA_RUN] = false;
|
||||
strm->internal->supported_actions[LZMA_SYNC_FLUSH] = false;
|
||||
strm->internal->supported_actions[LZMA_FULL_FLUSH] = false;
|
||||
strm->internal->supported_actions[LZMA_FINISH] = false;
|
||||
strm->internal->sequence = ISEQ_RUN;
|
||||
strm->internal->allow_buf_error = false;
|
||||
|
||||
@@ -197,7 +178,7 @@ lzma_code(lzma_stream *strm, lzma_action action)
|
||||
|| (strm->next_out == NULL && strm->avail_out != 0)
|
||||
|| strm->internal == NULL
|
||||
|| strm->internal->next.code == NULL
|
||||
|| (unsigned int)(action) > LZMA_ACTION_MAX
|
||||
|| (unsigned int)(action) > LZMA_FINISH
|
||||
|| !strm->internal->supported_actions[action])
|
||||
return LZMA_PROG_ERROR;
|
||||
|
||||
@@ -232,10 +213,6 @@ lzma_code(lzma_stream *strm, lzma_action action)
|
||||
case LZMA_FINISH:
|
||||
strm->internal->sequence = ISEQ_FINISH;
|
||||
break;
|
||||
|
||||
case LZMA_FULL_BARRIER:
|
||||
strm->internal->sequence = ISEQ_FULL_BARRIER;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -263,13 +240,6 @@ lzma_code(lzma_stream *strm, lzma_action action)
|
||||
|
||||
break;
|
||||
|
||||
case ISEQ_FULL_BARRIER:
|
||||
if (action != LZMA_FULL_BARRIER
|
||||
|| strm->internal->avail_in != strm->avail_in)
|
||||
return LZMA_PROG_ERROR;
|
||||
|
||||
break;
|
||||
|
||||
case ISEQ_END:
|
||||
return LZMA_STREAM_END;
|
||||
|
||||
@@ -295,9 +265,7 @@ lzma_code(lzma_stream *strm, lzma_action action)
|
||||
|
||||
strm->internal->avail_in = strm->avail_in;
|
||||
|
||||
// Cast is needed to silence a warning about LZMA_TIMED_OUT, which
|
||||
// isn't part of lzma_ret enumeration.
|
||||
switch ((unsigned int)(ret)) {
|
||||
switch (ret) {
|
||||
case LZMA_OK:
|
||||
// Don't return LZMA_BUF_ERROR when it happens the first time.
|
||||
// This is to avoid returning LZMA_BUF_ERROR when avail_out
|
||||
@@ -313,16 +281,9 @@ lzma_code(lzma_stream *strm, lzma_action action)
|
||||
}
|
||||
break;
|
||||
|
||||
case LZMA_TIMED_OUT:
|
||||
strm->internal->allow_buf_error = false;
|
||||
ret = LZMA_OK;
|
||||
break;
|
||||
|
||||
case LZMA_STREAM_END:
|
||||
if (strm->internal->sequence == ISEQ_SYNC_FLUSH
|
||||
|| strm->internal->sequence == ISEQ_FULL_FLUSH
|
||||
|| strm->internal->sequence
|
||||
== ISEQ_FULL_BARRIER)
|
||||
|| strm->internal->sequence == ISEQ_FULL_FLUSH)
|
||||
strm->internal->sequence = ISEQ_RUN;
|
||||
else
|
||||
strm->internal->sequence = ISEQ_END;
|
||||
@@ -362,22 +323,6 @@ lzma_end(lzma_stream *strm)
|
||||
}
|
||||
|
||||
|
||||
extern LZMA_API(void)
|
||||
lzma_get_progress(lzma_stream *strm,
|
||||
uint64_t *progress_in, uint64_t *progress_out)
|
||||
{
|
||||
if (strm->internal->next.get_progress != NULL) {
|
||||
strm->internal->next.get_progress(strm->internal->next.coder,
|
||||
progress_in, progress_out);
|
||||
} else {
|
||||
*progress_in = strm->total_in;
|
||||
*progress_out = strm->total_out;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
extern LZMA_API(lzma_check)
|
||||
lzma_get_check(const lzma_stream *strm)
|
||||
{
|
||||
|
||||
@@ -49,13 +49,6 @@
|
||||
#define LZMA_BUFFER_SIZE 4096
|
||||
|
||||
|
||||
/// Maximum number of worker threads within one multithreaded component.
|
||||
/// The limit exists solely to make it simpler to prevent integer overflows
|
||||
/// when allocating structures etc. This should be big enough for now...
|
||||
/// the code won't scale anywhere close to this number anyway.
|
||||
#define LZMA_THREADS_MAX 16384
|
||||
|
||||
|
||||
/// Starting value for memory usage estimates. Instead of calculating size
|
||||
/// of _every_ structure and taking into account malloc() overhead etc., we
|
||||
/// add a base size to all memory usage estimates. It's not very accurate
|
||||
@@ -73,21 +66,9 @@
|
||||
( LZMA_TELL_NO_CHECK \
|
||||
| LZMA_TELL_UNSUPPORTED_CHECK \
|
||||
| LZMA_TELL_ANY_CHECK \
|
||||
| LZMA_IGNORE_CHECK \
|
||||
| LZMA_CONCATENATED )
|
||||
|
||||
|
||||
/// Largest valid lzma_action value as unsigned integer.
|
||||
#define LZMA_ACTION_MAX ((unsigned int)(LZMA_FULL_BARRIER))
|
||||
|
||||
|
||||
/// Special return value (lzma_ret) to indicate that a timeout was reached
|
||||
/// and lzma_code() must not return LZMA_BUF_ERROR. This is converted to
|
||||
/// LZMA_OK in lzma_code(). This is not in the lzma_ret enumeration because
|
||||
/// there's no need to have it in the public API.
|
||||
#define LZMA_TIMED_OUT 32
|
||||
|
||||
|
||||
/// Type of encoder/decoder specific data; the actual structure is defined
|
||||
/// differently in different coders.
|
||||
typedef struct lzma_coder_s lzma_coder;
|
||||
@@ -99,7 +80,7 @@ typedef struct lzma_filter_info_s lzma_filter_info;
|
||||
|
||||
/// Type of a function used to initialize a filter encoder or decoder
|
||||
typedef lzma_ret (*lzma_init_function)(
|
||||
lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter_info *filters);
|
||||
|
||||
/// Type of a function to do some kind of coding work (filters, Stream,
|
||||
@@ -107,7 +88,7 @@ typedef lzma_ret (*lzma_init_function)(
|
||||
/// input and output buffers, but for simplicity they still use this same
|
||||
/// function prototype.
|
||||
typedef lzma_ret (*lzma_code_function)(
|
||||
lzma_coder *coder, const lzma_allocator *allocator,
|
||||
lzma_coder *coder, lzma_allocator *allocator,
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size,
|
||||
@@ -115,7 +96,7 @@ typedef lzma_ret (*lzma_code_function)(
|
||||
|
||||
/// Type of a function to free the memory allocated for the coder
|
||||
typedef void (*lzma_end_function)(
|
||||
lzma_coder *coder, const lzma_allocator *allocator);
|
||||
lzma_coder *coder, lzma_allocator *allocator);
|
||||
|
||||
|
||||
/// Raw coder validates and converts an array of lzma_filter structures to
|
||||
@@ -158,11 +139,6 @@ struct lzma_next_coder_s {
|
||||
/// lzma_next_coder.coder.
|
||||
lzma_end_function end;
|
||||
|
||||
/// Pointer to a function to get progress information. If this is NULL,
|
||||
/// lzma_stream.total_in and .total_out are used instead.
|
||||
void (*get_progress)(lzma_coder *coder,
|
||||
uint64_t *progress_in, uint64_t *progress_out);
|
||||
|
||||
/// Pointer to function to return the type of the integrity check.
|
||||
/// Most coders won't support this.
|
||||
lzma_check (*get_check)(const lzma_coder *coder);
|
||||
@@ -174,7 +150,7 @@ struct lzma_next_coder_s {
|
||||
|
||||
/// Update the filter-specific options or the whole filter chain
|
||||
/// in the encoder.
|
||||
lzma_ret (*update)(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
lzma_ret (*update)(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const lzma_filter *filters,
|
||||
const lzma_filter *reversed_filters);
|
||||
};
|
||||
@@ -188,7 +164,6 @@ struct lzma_next_coder_s {
|
||||
.id = LZMA_VLI_UNKNOWN, \
|
||||
.code = NULL, \
|
||||
.end = NULL, \
|
||||
.get_progress = NULL, \
|
||||
.get_check = NULL, \
|
||||
.memconfig = NULL, \
|
||||
.update = NULL, \
|
||||
@@ -210,7 +185,6 @@ struct lzma_internal_s {
|
||||
ISEQ_SYNC_FLUSH,
|
||||
ISEQ_FULL_FLUSH,
|
||||
ISEQ_FINISH,
|
||||
ISEQ_FULL_BARRIER,
|
||||
ISEQ_END,
|
||||
ISEQ_ERROR,
|
||||
} sequence;
|
||||
@@ -221,7 +195,7 @@ struct lzma_internal_s {
|
||||
size_t avail_in;
|
||||
|
||||
/// Indicates which lzma_action values are allowed by next.code.
|
||||
bool supported_actions[LZMA_ACTION_MAX + 1];
|
||||
bool supported_actions[4];
|
||||
|
||||
/// If true, lzma_code will return LZMA_BUF_ERROR if no progress was
|
||||
/// made (no input consumed and no output produced by next.code).
|
||||
@@ -230,17 +204,11 @@ struct lzma_internal_s {
|
||||
|
||||
|
||||
/// Allocates memory
|
||||
extern void *lzma_alloc(size_t size, const lzma_allocator *allocator)
|
||||
extern void *lzma_alloc(size_t size, lzma_allocator *allocator)
|
||||
lzma_attribute((__malloc__)) lzma_attr_alloc_size(1);
|
||||
|
||||
/// Allocates memory and zeroes it (like calloc()). This can be faster
|
||||
/// than lzma_alloc() + memzero() while being backward compatible with
|
||||
/// custom allocators.
|
||||
extern void * lzma_attribute((__malloc__)) lzma_attr_alloc_size(1)
|
||||
lzma_alloc_zero(size_t size, const lzma_allocator *allocator);
|
||||
|
||||
/// Frees memory
|
||||
extern void lzma_free(void *ptr, const lzma_allocator *allocator);
|
||||
extern void lzma_free(void *ptr, lzma_allocator *allocator);
|
||||
|
||||
|
||||
/// Allocates strm->internal if it is NULL, and initializes *strm and
|
||||
@@ -252,19 +220,17 @@ extern lzma_ret lzma_strm_init(lzma_stream *strm);
|
||||
/// than the filter being initialized now. This way the actual filter
|
||||
/// initialization functions don't need to use lzma_next_coder_init macro.
|
||||
extern lzma_ret lzma_next_filter_init(lzma_next_coder *next,
|
||||
const lzma_allocator *allocator,
|
||||
const lzma_filter_info *filters);
|
||||
lzma_allocator *allocator, const lzma_filter_info *filters);
|
||||
|
||||
/// Update the next filter in the chain, if any. This checks that
|
||||
/// the application is not trying to change the Filter IDs.
|
||||
extern lzma_ret lzma_next_filter_update(
|
||||
lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter *reversed_filters);
|
||||
|
||||
/// Frees the memory allocated for next->coder either using next->end or,
|
||||
/// if next->end is NULL, using lzma_free.
|
||||
extern void lzma_next_end(lzma_next_coder *next,
|
||||
const lzma_allocator *allocator);
|
||||
extern void lzma_next_end(lzma_next_coder *next, lzma_allocator *allocator);
|
||||
|
||||
|
||||
/// Copy as much data as possible from in[] to out[] and update *in_pos
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_easy_buffer_encode(uint32_t preset, lzma_check check,
|
||||
const lzma_allocator *allocator, const uint8_t *in,
|
||||
size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
lzma_allocator *allocator, const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
{
|
||||
lzma_options_easy opt_easy;
|
||||
if (lzma_easy_preset(&opt_easy, preset))
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "easy_preset.h"
|
||||
#include "stream_encoder.h"
|
||||
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_raw_buffer_decode(
|
||||
const lzma_filter *filters, const lzma_allocator *allocator,
|
||||
lzma_raw_buffer_decode(const lzma_filter *filters, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
{
|
||||
|
||||
@@ -14,10 +14,9 @@
|
||||
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_raw_buffer_encode(
|
||||
const lzma_filter *filters, const lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
lzma_raw_buffer_encode(const lzma_filter *filters, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size, uint8_t *out,
|
||||
size_t *out_pos, size_t out_size)
|
||||
{
|
||||
// Validate what isn't validated later in filter_common.c.
|
||||
if ((in == NULL && in_size != 0) || out == NULL
|
||||
|
||||
@@ -123,7 +123,7 @@ static const struct {
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_filters_copy(const lzma_filter *src, lzma_filter *dest,
|
||||
const lzma_allocator *allocator)
|
||||
lzma_allocator *allocator)
|
||||
{
|
||||
if (src == NULL || dest == NULL)
|
||||
return LZMA_PROG_ERROR;
|
||||
@@ -239,7 +239,7 @@ validate_chain(const lzma_filter *filters, size_t *count)
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_raw_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_raw_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter *options,
|
||||
lzma_filter_find coder_find, bool is_encoder)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ typedef const lzma_filter_coder *(*lzma_filter_find)(lzma_vli id);
|
||||
|
||||
|
||||
extern lzma_ret lzma_raw_coder_init(
|
||||
lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter *filters,
|
||||
lzma_filter_find coder_find, bool is_encoder);
|
||||
|
||||
|
||||
@@ -35,8 +35,7 @@ typedef struct {
|
||||
/// \return - LZMA_OK: Properties decoded successfully.
|
||||
/// - LZMA_OPTIONS_ERROR: Unsupported properties
|
||||
/// - LZMA_MEM_ERROR: Memory allocation failed.
|
||||
lzma_ret (*props_decode)(
|
||||
void **options, const lzma_allocator *allocator,
|
||||
lzma_ret (*props_decode)(void **options, lzma_allocator *allocator,
|
||||
const uint8_t *props, size_t props_size);
|
||||
|
||||
} lzma_filter_decoder;
|
||||
@@ -137,7 +136,7 @@ lzma_filter_decoder_is_supported(lzma_vli id)
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_raw_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_raw_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter *options)
|
||||
{
|
||||
return lzma_raw_coder_init(next, allocator,
|
||||
@@ -166,7 +165,7 @@ lzma_raw_decoder_memusage(const lzma_filter *filters)
|
||||
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_properties_decode(lzma_filter *filter, const lzma_allocator *allocator,
|
||||
lzma_properties_decode(lzma_filter *filter, lzma_allocator *allocator,
|
||||
const uint8_t *props, size_t props_size)
|
||||
{
|
||||
// Make it always NULL so that the caller can always safely free() it.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
extern lzma_ret lzma_raw_decoder_init(
|
||||
lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter *options);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,11 +30,11 @@ typedef struct {
|
||||
/// invalid, UINT64_MAX is returned.
|
||||
uint64_t (*memusage)(const void *options);
|
||||
|
||||
/// Calculates the recommended Uncompressed Size for .xz Blocks to
|
||||
/// which the input data can be split to make multithreaded
|
||||
/// encoding possible. If this is NULL, it is assumed that
|
||||
/// the encoder is fast enough with single thread.
|
||||
uint64_t (*block_size)(const void *options);
|
||||
/// Calculates the minimum sane size for Blocks (or other types of
|
||||
/// chunks) to which the input data can be split to make
|
||||
/// multithreaded encoding possible. If this is NULL, it is assumed
|
||||
/// that the encoder is fast enough with single thread.
|
||||
lzma_vli (*chunk_size)(const void *options);
|
||||
|
||||
/// Tells the size of the Filter Properties field. If options are
|
||||
/// invalid, UINT32_MAX is returned. If this is NULL, props_size_fixed
|
||||
@@ -59,7 +59,7 @@ static const lzma_filter_encoder encoders[] = {
|
||||
.id = LZMA_FILTER_LZMA1,
|
||||
.init = &lzma_lzma_encoder_init,
|
||||
.memusage = &lzma_lzma_encoder_memusage,
|
||||
.block_size = NULL, // FIXME
|
||||
.chunk_size = NULL, // FIXME
|
||||
.props_size_get = NULL,
|
||||
.props_size_fixed = 5,
|
||||
.props_encode = &lzma_lzma_props_encode,
|
||||
@@ -70,7 +70,7 @@ static const lzma_filter_encoder encoders[] = {
|
||||
.id = LZMA_FILTER_LZMA2,
|
||||
.init = &lzma_lzma2_encoder_init,
|
||||
.memusage = &lzma_lzma2_encoder_memusage,
|
||||
.block_size = &lzma_lzma2_block_size, // FIXME
|
||||
.chunk_size = NULL, // FIXME
|
||||
.props_size_get = NULL,
|
||||
.props_size_fixed = 1,
|
||||
.props_encode = &lzma_lzma2_props_encode,
|
||||
@@ -81,7 +81,7 @@ static const lzma_filter_encoder encoders[] = {
|
||||
.id = LZMA_FILTER_X86,
|
||||
.init = &lzma_simple_x86_encoder_init,
|
||||
.memusage = NULL,
|
||||
.block_size = NULL,
|
||||
.chunk_size = NULL,
|
||||
.props_size_get = &lzma_simple_props_size,
|
||||
.props_encode = &lzma_simple_props_encode,
|
||||
},
|
||||
@@ -91,7 +91,7 @@ static const lzma_filter_encoder encoders[] = {
|
||||
.id = LZMA_FILTER_POWERPC,
|
||||
.init = &lzma_simple_powerpc_encoder_init,
|
||||
.memusage = NULL,
|
||||
.block_size = NULL,
|
||||
.chunk_size = NULL,
|
||||
.props_size_get = &lzma_simple_props_size,
|
||||
.props_encode = &lzma_simple_props_encode,
|
||||
},
|
||||
@@ -101,7 +101,7 @@ static const lzma_filter_encoder encoders[] = {
|
||||
.id = LZMA_FILTER_IA64,
|
||||
.init = &lzma_simple_ia64_encoder_init,
|
||||
.memusage = NULL,
|
||||
.block_size = NULL,
|
||||
.chunk_size = NULL,
|
||||
.props_size_get = &lzma_simple_props_size,
|
||||
.props_encode = &lzma_simple_props_encode,
|
||||
},
|
||||
@@ -111,7 +111,7 @@ static const lzma_filter_encoder encoders[] = {
|
||||
.id = LZMA_FILTER_ARM,
|
||||
.init = &lzma_simple_arm_encoder_init,
|
||||
.memusage = NULL,
|
||||
.block_size = NULL,
|
||||
.chunk_size = NULL,
|
||||
.props_size_get = &lzma_simple_props_size,
|
||||
.props_encode = &lzma_simple_props_encode,
|
||||
},
|
||||
@@ -121,7 +121,7 @@ static const lzma_filter_encoder encoders[] = {
|
||||
.id = LZMA_FILTER_ARMTHUMB,
|
||||
.init = &lzma_simple_armthumb_encoder_init,
|
||||
.memusage = NULL,
|
||||
.block_size = NULL,
|
||||
.chunk_size = NULL,
|
||||
.props_size_get = &lzma_simple_props_size,
|
||||
.props_encode = &lzma_simple_props_encode,
|
||||
},
|
||||
@@ -131,7 +131,7 @@ static const lzma_filter_encoder encoders[] = {
|
||||
.id = LZMA_FILTER_SPARC,
|
||||
.init = &lzma_simple_sparc_encoder_init,
|
||||
.memusage = NULL,
|
||||
.block_size = NULL,
|
||||
.chunk_size = NULL,
|
||||
.props_size_get = &lzma_simple_props_size,
|
||||
.props_encode = &lzma_simple_props_encode,
|
||||
},
|
||||
@@ -141,7 +141,7 @@ static const lzma_filter_encoder encoders[] = {
|
||||
.id = LZMA_FILTER_DELTA,
|
||||
.init = &lzma_delta_encoder_init,
|
||||
.memusage = &lzma_delta_coder_memusage,
|
||||
.block_size = NULL,
|
||||
.chunk_size = NULL,
|
||||
.props_size_get = NULL,
|
||||
.props_size_fixed = 1,
|
||||
.props_encode = &lzma_delta_props_encode,
|
||||
@@ -196,7 +196,7 @@ lzma_filters_update(lzma_stream *strm, const lzma_filter *filters)
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_raw_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_raw_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter *options)
|
||||
{
|
||||
return lzma_raw_coder_init(next, allocator,
|
||||
@@ -226,19 +226,20 @@ lzma_raw_encoder_memusage(const lzma_filter *filters)
|
||||
}
|
||||
|
||||
|
||||
extern uint64_t
|
||||
lzma_mt_block_size(const lzma_filter *filters)
|
||||
/*
|
||||
extern LZMA_API(lzma_vli)
|
||||
lzma_chunk_size(const lzma_filter *filters)
|
||||
{
|
||||
uint64_t max = 0;
|
||||
lzma_vli max = 0;
|
||||
|
||||
for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
|
||||
const lzma_filter_encoder *const fe
|
||||
= encoder_find(filters[i].id);
|
||||
if (fe->block_size != NULL) {
|
||||
const uint64_t size
|
||||
= fe->block_size(filters[i].options);
|
||||
if (size == 0)
|
||||
return 0;
|
||||
if (fe->chunk_size != NULL) {
|
||||
const lzma_vli size
|
||||
= fe->chunk_size(filters[i].options);
|
||||
if (size == LZMA_VLI_UNKNOWN)
|
||||
return LZMA_VLI_UNKNOWN;
|
||||
|
||||
if (size > max)
|
||||
max = size;
|
||||
@@ -247,6 +248,7 @@ lzma_mt_block_size(const lzma_filter *filters)
|
||||
|
||||
return max;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
#include "common.h"
|
||||
|
||||
|
||||
// FIXME: Might become a part of the public API.
|
||||
extern uint64_t lzma_mt_block_size(const lzma_filter *filters);
|
||||
// FIXME: Might become a part of the public API once finished.
|
||||
// extern lzma_vli lzma_chunk_size(const lzma_filter *filters);
|
||||
|
||||
|
||||
extern lzma_ret lzma_raw_encoder_init(
|
||||
lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter *filters);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_filter_flags_decode(
|
||||
lzma_filter *filter, const lzma_allocator *allocator,
|
||||
lzma_filter *filter, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size)
|
||||
{
|
||||
// Set the pointer to NULL so the caller can always safely free it.
|
||||
|
||||
@@ -191,8 +191,8 @@ index_tree_init(index_tree *tree)
|
||||
|
||||
/// Helper for index_tree_end()
|
||||
static void
|
||||
index_tree_node_end(index_tree_node *node, const lzma_allocator *allocator,
|
||||
void (*free_func)(void *node, const lzma_allocator *allocator))
|
||||
index_tree_node_end(index_tree_node *node, lzma_allocator *allocator,
|
||||
void (*free_func)(void *node, lzma_allocator *allocator))
|
||||
{
|
||||
// The tree won't ever be very huge, so recursion should be fine.
|
||||
// 20 levels in the tree is likely quite a lot already in practice.
|
||||
@@ -215,8 +215,8 @@ index_tree_node_end(index_tree_node *node, const lzma_allocator *allocator,
|
||||
/// to free the Record groups from each index_stream before freeing
|
||||
/// the index_stream itself.
|
||||
static void
|
||||
index_tree_end(index_tree *tree, const lzma_allocator *allocator,
|
||||
void (*free_func)(void *node, const lzma_allocator *allocator))
|
||||
index_tree_end(index_tree *tree, lzma_allocator *allocator,
|
||||
void (*free_func)(void *node, lzma_allocator *allocator))
|
||||
{
|
||||
if (tree->root != NULL)
|
||||
index_tree_node_end(tree->root, allocator, free_func);
|
||||
@@ -339,8 +339,8 @@ index_tree_locate(const index_tree *tree, lzma_vli target)
|
||||
/// Allocate and initialize a new Stream using the given base offsets.
|
||||
static index_stream *
|
||||
index_stream_init(lzma_vli compressed_base, lzma_vli uncompressed_base,
|
||||
uint32_t stream_number, lzma_vli block_number_base,
|
||||
const lzma_allocator *allocator)
|
||||
lzma_vli stream_number, lzma_vli block_number_base,
|
||||
lzma_allocator *allocator)
|
||||
{
|
||||
index_stream *s = lzma_alloc(sizeof(index_stream), allocator);
|
||||
if (s == NULL)
|
||||
@@ -368,7 +368,7 @@ index_stream_init(lzma_vli compressed_base, lzma_vli uncompressed_base,
|
||||
|
||||
/// Free the memory allocated for a Stream and its Record groups.
|
||||
static void
|
||||
index_stream_end(void *node, const lzma_allocator *allocator)
|
||||
index_stream_end(void *node, lzma_allocator *allocator)
|
||||
{
|
||||
index_stream *s = node;
|
||||
index_tree_end(&s->groups, allocator, NULL);
|
||||
@@ -377,7 +377,7 @@ index_stream_end(void *node, const lzma_allocator *allocator)
|
||||
|
||||
|
||||
static lzma_index *
|
||||
index_init_plain(const lzma_allocator *allocator)
|
||||
index_init_plain(lzma_allocator *allocator)
|
||||
{
|
||||
lzma_index *i = lzma_alloc(sizeof(lzma_index), allocator);
|
||||
if (i != NULL) {
|
||||
@@ -395,7 +395,7 @@ index_init_plain(const lzma_allocator *allocator)
|
||||
|
||||
|
||||
extern LZMA_API(lzma_index *)
|
||||
lzma_index_init(const lzma_allocator *allocator)
|
||||
lzma_index_init(lzma_allocator *allocator)
|
||||
{
|
||||
lzma_index *i = index_init_plain(allocator);
|
||||
if (i == NULL)
|
||||
@@ -414,7 +414,7 @@ lzma_index_init(const lzma_allocator *allocator)
|
||||
|
||||
|
||||
extern LZMA_API(void)
|
||||
lzma_index_end(lzma_index *i, const lzma_allocator *allocator)
|
||||
lzma_index_end(lzma_index *i, lzma_allocator *allocator)
|
||||
{
|
||||
// NOTE: If you modify this function, check also the bottom
|
||||
// of lzma_index_cat().
|
||||
@@ -637,7 +637,7 @@ lzma_index_stream_padding(lzma_index *i, lzma_vli stream_padding)
|
||||
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_index_append(lzma_index *i, const lzma_allocator *allocator,
|
||||
lzma_index_append(lzma_index *i, lzma_allocator *allocator,
|
||||
lzma_vli unpadded_size, lzma_vli uncompressed_size)
|
||||
{
|
||||
// Validate.
|
||||
@@ -765,7 +765,7 @@ index_cat_helper(const index_cat_info *info, index_stream *this)
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
|
||||
const lzma_allocator *allocator)
|
||||
lzma_allocator *allocator)
|
||||
{
|
||||
const lzma_vli dest_file_size = lzma_index_file_size(dest);
|
||||
|
||||
@@ -859,7 +859,7 @@ lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
|
||||
|
||||
/// Duplicate an index_stream.
|
||||
static index_stream *
|
||||
index_dup_stream(const index_stream *src, const lzma_allocator *allocator)
|
||||
index_dup_stream(const index_stream *src, lzma_allocator *allocator)
|
||||
{
|
||||
// Catch a somewhat theoretical integer overflow.
|
||||
if (src->record_count > PREALLOC_MAX)
|
||||
@@ -919,7 +919,7 @@ index_dup_stream(const index_stream *src, const lzma_allocator *allocator)
|
||||
|
||||
|
||||
extern LZMA_API(lzma_index *)
|
||||
lzma_index_dup(const lzma_index *src, const lzma_allocator *allocator)
|
||||
lzma_index_dup(const lzma_index *src, lzma_allocator *allocator)
|
||||
{
|
||||
// Allocate the base structure (no initial Stream).
|
||||
lzma_index *dest = index_init_plain(allocator);
|
||||
@@ -1008,8 +1008,6 @@ iter_set_info(lzma_index_iter *iter)
|
||||
iter->internal[ITER_GROUP].p = NULL;
|
||||
}
|
||||
|
||||
// NOTE: lzma_index_iter.stream.number is lzma_vli but we use uint32_t
|
||||
// internally.
|
||||
iter->stream.number = stream->number;
|
||||
iter->stream.block_count = stream->record_count;
|
||||
iter->stream.compressed_offset = stream->node.compressed_base;
|
||||
|
||||
@@ -54,7 +54,7 @@ struct lzma_coder_s {
|
||||
|
||||
|
||||
static lzma_ret
|
||||
index_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
index_decode(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size,
|
||||
uint8_t *restrict out lzma_attribute((__unused__)),
|
||||
@@ -207,7 +207,7 @@ out:
|
||||
|
||||
|
||||
static void
|
||||
index_decoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
index_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
lzma_index_end(coder->index, allocator);
|
||||
lzma_free(coder, allocator);
|
||||
@@ -234,7 +234,7 @@ index_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
|
||||
|
||||
|
||||
static lzma_ret
|
||||
index_decoder_reset(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
index_decoder_reset(lzma_coder *coder, lzma_allocator *allocator,
|
||||
lzma_index **i, uint64_t memlimit)
|
||||
{
|
||||
// Remember the pointer given by the application. We will set it
|
||||
@@ -261,7 +261,7 @@ index_decoder_reset(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
static lzma_ret
|
||||
index_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
index_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
lzma_index **i, uint64_t memlimit)
|
||||
{
|
||||
lzma_next_coder_init(&index_decoder_init, next, allocator);
|
||||
@@ -299,8 +299,8 @@ lzma_index_decoder(lzma_stream *strm, lzma_index **i, uint64_t memlimit)
|
||||
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_index_buffer_decode(lzma_index **i, uint64_t *memlimit,
|
||||
const lzma_allocator *allocator,
|
||||
lzma_index_buffer_decode(
|
||||
lzma_index **i, uint64_t *memlimit, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size)
|
||||
{
|
||||
// Sanity checks
|
||||
|
||||
@@ -42,7 +42,7 @@ struct lzma_coder_s {
|
||||
|
||||
static lzma_ret
|
||||
index_encode(lzma_coder *coder,
|
||||
const lzma_allocator *allocator lzma_attribute((__unused__)),
|
||||
lzma_allocator *allocator lzma_attribute((__unused__)),
|
||||
const uint8_t *restrict in lzma_attribute((__unused__)),
|
||||
size_t *restrict in_pos lzma_attribute((__unused__)),
|
||||
size_t in_size lzma_attribute((__unused__)),
|
||||
@@ -159,7 +159,7 @@ out:
|
||||
|
||||
|
||||
static void
|
||||
index_encoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
index_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
lzma_free(coder, allocator);
|
||||
return;
|
||||
@@ -181,7 +181,7 @@ index_encoder_reset(lzma_coder *coder, const lzma_index *i)
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_index_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_index_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_index *i)
|
||||
{
|
||||
lzma_next_coder_init(&lzma_index_encoder_init, next, allocator);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
extern lzma_ret lzma_index_encoder_init(lzma_next_coder *next,
|
||||
const lzma_allocator *allocator, const lzma_index *i);
|
||||
lzma_allocator *allocator, const lzma_index *i);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -70,8 +70,7 @@ struct lzma_index_hash_s {
|
||||
|
||||
|
||||
extern LZMA_API(lzma_index_hash *)
|
||||
lzma_index_hash_init(lzma_index_hash *index_hash,
|
||||
const lzma_allocator *allocator)
|
||||
lzma_index_hash_init(lzma_index_hash *index_hash, lzma_allocator *allocator)
|
||||
{
|
||||
if (index_hash == NULL) {
|
||||
index_hash = lzma_alloc(sizeof(lzma_index_hash), allocator);
|
||||
@@ -102,8 +101,7 @@ lzma_index_hash_init(lzma_index_hash *index_hash,
|
||||
|
||||
|
||||
extern LZMA_API(void)
|
||||
lzma_index_hash_end(lzma_index_hash *index_hash,
|
||||
const lzma_allocator *allocator)
|
||||
lzma_index_hash_end(lzma_index_hash *index_hash, lzma_allocator *allocator)
|
||||
{
|
||||
lzma_free(index_hash, allocator);
|
||||
return;
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file memcmplen.h
|
||||
/// \brief Optimized comparison of two buffers
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LZMA_MEMCMPLEN_H
|
||||
#define LZMA_MEMCMPLEN_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifdef HAVE_IMMINTRIN_H
|
||||
# include <immintrin.h>
|
||||
#endif
|
||||
|
||||
|
||||
/// Find out how many equal bytes the two buffers have.
|
||||
///
|
||||
/// \param buf1 First buffer
|
||||
/// \param buf2 Second buffer
|
||||
/// \param len How many bytes have already been compared and will
|
||||
/// be assumed to match
|
||||
/// \param limit How many bytes to compare at most, including the
|
||||
/// already-compared bytes. This must be significantly
|
||||
/// smaller than UINT32_MAX to avoid integer overflows.
|
||||
/// Up to LZMA_MEMCMPLEN_EXTRA bytes may be read past
|
||||
/// the specified limit from both buf1 and buf2.
|
||||
///
|
||||
/// \return Number of equal bytes in the buffers is returned.
|
||||
/// This is always at least len and at most limit.
|
||||
///
|
||||
/// \note LZMA_MEMCMPLEN_EXTRA defines how many extra bytes may be read.
|
||||
/// It's rounded up to 2^n. This extra amount needs to be
|
||||
/// allocated in the buffers being used. It needs to be
|
||||
/// initialized too to keep Valgrind quiet.
|
||||
static inline uint32_t lzma_attribute((__always_inline__))
|
||||
lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2,
|
||||
uint32_t len, uint32_t limit)
|
||||
{
|
||||
assert(len <= limit);
|
||||
assert(limit <= UINT32_MAX / 2);
|
||||
|
||||
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
|
||||
&& ((TUKLIB_GNUC_REQ(3, 4) && defined(__x86_64__)) \
|
||||
|| (defined(__INTEL_COMPILER) && defined(__x86_64__)) \
|
||||
|| (defined(__INTEL_COMPILER) && defined(_M_X64)) \
|
||||
|| (defined(_MSC_VER) && defined(_M_X64)))
|
||||
// NOTE: This will use 64-bit unaligned access which
|
||||
// TUKLIB_FAST_UNALIGNED_ACCESS wasn't meant to permit, but
|
||||
// it's convenient here at least as long as it's x86-64 only.
|
||||
//
|
||||
// I keep this x86-64 only for now since that's where I know this
|
||||
// to be a good method. This may be fine on other 64-bit CPUs too.
|
||||
// On big endian one should use xor instead of subtraction and switch
|
||||
// to __builtin_clzll().
|
||||
#define LZMA_MEMCMPLEN_EXTRA 8
|
||||
while (len < limit) {
|
||||
const uint64_t x = *(const uint64_t *)(buf1 + len)
|
||||
- *(const uint64_t *)(buf2 + len);
|
||||
if (x != 0) {
|
||||
# if defined(_M_X64) // MSVC or Intel C compiler on Windows
|
||||
unsigned long tmp;
|
||||
_BitScanForward64(&tmp, x);
|
||||
len += (uint32_t)tmp >> 3;
|
||||
# else // GCC, clang, or Intel C compiler
|
||||
len += (uint32_t)__builtin_ctzll(x) >> 3;
|
||||
# endif
|
||||
return my_min(len, limit);
|
||||
}
|
||||
|
||||
len += 8;
|
||||
}
|
||||
|
||||
return limit;
|
||||
|
||||
#elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
|
||||
&& defined(HAVE__MM_MOVEMASK_EPI8) \
|
||||
&& ((defined(__GNUC__) && defined(__SSE2_MATH__)) \
|
||||
|| (defined(__INTEL_COMPILER) && defined(__SSE2__)) \
|
||||
|| (defined(_MSC_VER) && defined(_M_IX86_FP) \
|
||||
&& _M_IX86_FP >= 2))
|
||||
// NOTE: Like above, this will use 128-bit unaligned access which
|
||||
// TUKLIB_FAST_UNALIGNED_ACCESS wasn't meant to permit.
|
||||
//
|
||||
// SSE2 version for 32-bit and 64-bit x86. On x86-64 the above
|
||||
// version is sometimes significantly faster and sometimes
|
||||
// slightly slower than this SSE2 version, so this SSE2
|
||||
// version isn't used on x86-64.
|
||||
# define LZMA_MEMCMPLEN_EXTRA 16
|
||||
while (len < limit) {
|
||||
const uint32_t x = 0xFFFF ^ _mm_movemask_epi8(_mm_cmpeq_epi8(
|
||||
_mm_loadu_si128((const __m128i *)(buf1 + len)),
|
||||
_mm_loadu_si128((const __m128i *)(buf2 + len))));
|
||||
|
||||
if (x != 0) {
|
||||
# if defined(__INTEL_COMPILER)
|
||||
len += _bit_scan_forward(x);
|
||||
# elif defined(_MSC_VER)
|
||||
unsigned long tmp;
|
||||
_BitScanForward(&tmp, x);
|
||||
len += tmp;
|
||||
# else
|
||||
len += __builtin_ctz(x);
|
||||
# endif
|
||||
return my_min(len, limit);
|
||||
}
|
||||
|
||||
len += 16;
|
||||
}
|
||||
|
||||
return limit;
|
||||
|
||||
#elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) && !defined(WORDS_BIGENDIAN)
|
||||
// Generic 32-bit little endian method
|
||||
# define LZMA_MEMCMPLEN_EXTRA 4
|
||||
while (len < limit) {
|
||||
uint32_t x = *(const uint32_t *)(buf1 + len)
|
||||
- *(const uint32_t *)(buf2 + len);
|
||||
if (x != 0) {
|
||||
if ((x & 0xFFFF) == 0) {
|
||||
len += 2;
|
||||
x >>= 16;
|
||||
}
|
||||
|
||||
if ((x & 0xFF) == 0)
|
||||
++len;
|
||||
|
||||
return my_min(len, limit);
|
||||
}
|
||||
|
||||
len += 4;
|
||||
}
|
||||
|
||||
return limit;
|
||||
|
||||
#elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) && defined(WORDS_BIGENDIAN)
|
||||
// Generic 32-bit big endian method
|
||||
# define LZMA_MEMCMPLEN_EXTRA 4
|
||||
while (len < limit) {
|
||||
uint32_t x = *(const uint32_t *)(buf1 + len)
|
||||
^ *(const uint32_t *)(buf2 + len);
|
||||
if (x != 0) {
|
||||
if ((x & 0xFFFF0000) == 0) {
|
||||
len += 2;
|
||||
x <<= 16;
|
||||
}
|
||||
|
||||
if ((x & 0xFF000000) == 0)
|
||||
++len;
|
||||
|
||||
return my_min(len, limit);
|
||||
}
|
||||
|
||||
len += 4;
|
||||
}
|
||||
|
||||
return limit;
|
||||
|
||||
#else
|
||||
// Simple portable version that doesn't use unaligned access.
|
||||
# define LZMA_MEMCMPLEN_EXTRA 0
|
||||
while (len < limit && buf1[len] == buf2[len])
|
||||
++len;
|
||||
|
||||
return len;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,184 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file outqueue.c
|
||||
/// \brief Output queue handling in multithreaded coding
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "outqueue.h"
|
||||
|
||||
|
||||
/// This is to ease integer overflow checking: We may allocate up to
|
||||
/// 2 * LZMA_THREADS_MAX buffers and we need some extra memory for other
|
||||
/// data structures (that's the second /2).
|
||||
#define BUF_SIZE_MAX (UINT64_MAX / LZMA_THREADS_MAX / 2 / 2)
|
||||
|
||||
|
||||
static lzma_ret
|
||||
get_options(uint64_t *bufs_alloc_size, uint32_t *bufs_count,
|
||||
uint64_t buf_size_max, uint32_t threads)
|
||||
{
|
||||
if (threads > LZMA_THREADS_MAX || buf_size_max > BUF_SIZE_MAX)
|
||||
return LZMA_OPTIONS_ERROR;
|
||||
|
||||
// The number of buffers is twice the number of threads.
|
||||
// This wastes RAM but keeps the threads busy when buffers
|
||||
// finish out of order.
|
||||
//
|
||||
// NOTE: If this is changed, update BUF_SIZE_MAX too.
|
||||
*bufs_count = threads * 2;
|
||||
*bufs_alloc_size = *bufs_count * buf_size_max;
|
||||
|
||||
return LZMA_OK;
|
||||
}
|
||||
|
||||
|
||||
extern uint64_t
|
||||
lzma_outq_memusage(uint64_t buf_size_max, uint32_t threads)
|
||||
{
|
||||
uint64_t bufs_alloc_size;
|
||||
uint32_t bufs_count;
|
||||
|
||||
if (get_options(&bufs_alloc_size, &bufs_count, buf_size_max, threads)
|
||||
!= LZMA_OK)
|
||||
return UINT64_MAX;
|
||||
|
||||
return sizeof(lzma_outq) + bufs_count * sizeof(lzma_outbuf)
|
||||
+ bufs_alloc_size;
|
||||
}
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_outq_init(lzma_outq *outq, const lzma_allocator *allocator,
|
||||
uint64_t buf_size_max, uint32_t threads)
|
||||
{
|
||||
uint64_t bufs_alloc_size;
|
||||
uint32_t bufs_count;
|
||||
|
||||
// Set bufs_count and bufs_alloc_size.
|
||||
return_if_error(get_options(&bufs_alloc_size, &bufs_count,
|
||||
buf_size_max, threads));
|
||||
|
||||
// Allocate memory if needed.
|
||||
if (outq->buf_size_max != buf_size_max
|
||||
|| outq->bufs_allocated != bufs_count) {
|
||||
lzma_outq_end(outq, allocator);
|
||||
|
||||
#if SIZE_MAX < UINT64_MAX
|
||||
if (bufs_alloc_size > SIZE_MAX)
|
||||
return LZMA_MEM_ERROR;
|
||||
#endif
|
||||
|
||||
outq->bufs = lzma_alloc(bufs_count * sizeof(lzma_outbuf),
|
||||
allocator);
|
||||
outq->bufs_mem = lzma_alloc((size_t)(bufs_alloc_size),
|
||||
allocator);
|
||||
|
||||
if (outq->bufs == NULL || outq->bufs_mem == NULL) {
|
||||
lzma_outq_end(outq, allocator);
|
||||
return LZMA_MEM_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize the rest of the main structure. Initialization of
|
||||
// outq->bufs[] is done when they are actually needed.
|
||||
outq->buf_size_max = (size_t)(buf_size_max);
|
||||
outq->bufs_allocated = bufs_count;
|
||||
outq->bufs_pos = 0;
|
||||
outq->bufs_used = 0;
|
||||
outq->read_pos = 0;
|
||||
|
||||
return LZMA_OK;
|
||||
}
|
||||
|
||||
|
||||
extern void
|
||||
lzma_outq_end(lzma_outq *outq, const lzma_allocator *allocator)
|
||||
{
|
||||
lzma_free(outq->bufs, allocator);
|
||||
outq->bufs = NULL;
|
||||
|
||||
lzma_free(outq->bufs_mem, allocator);
|
||||
outq->bufs_mem = NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
extern lzma_outbuf *
|
||||
lzma_outq_get_buf(lzma_outq *outq)
|
||||
{
|
||||
// Caller must have checked it with lzma_outq_has_buf().
|
||||
assert(outq->bufs_used < outq->bufs_allocated);
|
||||
|
||||
// Initialize the new buffer.
|
||||
lzma_outbuf *buf = &outq->bufs[outq->bufs_pos];
|
||||
buf->buf = outq->bufs_mem + outq->bufs_pos * outq->buf_size_max;
|
||||
buf->size = 0;
|
||||
buf->finished = false;
|
||||
|
||||
// Update the queue state.
|
||||
if (++outq->bufs_pos == outq->bufs_allocated)
|
||||
outq->bufs_pos = 0;
|
||||
|
||||
++outq->bufs_used;
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
extern bool
|
||||
lzma_outq_is_readable(const lzma_outq *outq)
|
||||
{
|
||||
uint32_t i = outq->bufs_pos - outq->bufs_used;
|
||||
if (outq->bufs_pos < outq->bufs_used)
|
||||
i += outq->bufs_allocated;
|
||||
|
||||
return outq->bufs[i].finished;
|
||||
}
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_outq_read(lzma_outq *restrict outq, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size,
|
||||
lzma_vli *restrict unpadded_size,
|
||||
lzma_vli *restrict uncompressed_size)
|
||||
{
|
||||
// There must be at least one buffer from which to read.
|
||||
if (outq->bufs_used == 0)
|
||||
return LZMA_OK;
|
||||
|
||||
// Get the buffer.
|
||||
uint32_t i = outq->bufs_pos - outq->bufs_used;
|
||||
if (outq->bufs_pos < outq->bufs_used)
|
||||
i += outq->bufs_allocated;
|
||||
|
||||
lzma_outbuf *buf = &outq->bufs[i];
|
||||
|
||||
// If it isn't finished yet, we cannot read from it.
|
||||
if (!buf->finished)
|
||||
return LZMA_OK;
|
||||
|
||||
// Copy from the buffer to output.
|
||||
lzma_bufcpy(buf->buf, &outq->read_pos, buf->size,
|
||||
out, out_pos, out_size);
|
||||
|
||||
// Return if we didn't get all the data from the buffer.
|
||||
if (outq->read_pos < buf->size)
|
||||
return LZMA_OK;
|
||||
|
||||
// The buffer was finished. Tell the caller its size information.
|
||||
*unpadded_size = buf->unpadded_size;
|
||||
*uncompressed_size = buf->uncompressed_size;
|
||||
|
||||
// Free this buffer for further use.
|
||||
--outq->bufs_used;
|
||||
outq->read_pos = 0;
|
||||
|
||||
return LZMA_STREAM_END;
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file outqueue.h
|
||||
/// \brief Output queue handling in multithreaded coding
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
||||
/// Output buffer for a single thread
|
||||
typedef struct {
|
||||
/// Pointer to the output buffer of lzma_outq.buf_size_max bytes
|
||||
uint8_t *buf;
|
||||
|
||||
/// Amount of data written to buf
|
||||
size_t size;
|
||||
|
||||
/// Additional size information
|
||||
lzma_vli unpadded_size;
|
||||
lzma_vli uncompressed_size;
|
||||
|
||||
/// True when no more data will be written into this buffer.
|
||||
///
|
||||
/// \note This is read by another thread and thus access
|
||||
/// to this variable needs a mutex.
|
||||
bool finished;
|
||||
|
||||
} lzma_outbuf;
|
||||
|
||||
|
||||
typedef struct {
|
||||
/// Array of buffers that are used cyclically.
|
||||
lzma_outbuf *bufs;
|
||||
|
||||
/// Memory allocated for all the buffers
|
||||
uint8_t *bufs_mem;
|
||||
|
||||
/// Amount of buffer space available in each buffer
|
||||
size_t buf_size_max;
|
||||
|
||||
/// Number of buffers allocated
|
||||
uint32_t bufs_allocated;
|
||||
|
||||
/// Position in the bufs array. The next buffer to be taken
|
||||
/// into use is bufs[bufs_pos].
|
||||
uint32_t bufs_pos;
|
||||
|
||||
/// Number of buffers in use
|
||||
uint32_t bufs_used;
|
||||
|
||||
/// Position in the buffer in lzma_outq_read()
|
||||
size_t read_pos;
|
||||
|
||||
} lzma_outq;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate the memory usage of an output queue
|
||||
*
|
||||
* \return Approximate memory usage in bytes or UINT64_MAX on error.
|
||||
*/
|
||||
extern uint64_t lzma_outq_memusage(uint64_t buf_size_max, uint32_t threads);
|
||||
|
||||
|
||||
/// \brief Initialize an output queue
|
||||
///
|
||||
/// \param outq Pointer to an output queue. Before calling
|
||||
/// this function the first time, *outq should
|
||||
/// have been zeroed with memzero() so that this
|
||||
/// function knows that there are no previous
|
||||
/// allocations to free.
|
||||
/// \param allocator Pointer to allocator or NULL
|
||||
/// \param buf_size_max Maximum amount of data that a single buffer
|
||||
/// in the queue may need to store.
|
||||
/// \param threads Number of buffers that may be in use
|
||||
/// concurrently. Note that more than this number
|
||||
/// of buffers will actually get allocated to
|
||||
/// improve performance when buffers finish
|
||||
/// out of order.
|
||||
///
|
||||
/// \return - LZMA_OK
|
||||
/// - LZMA_MEM_ERROR
|
||||
///
|
||||
extern lzma_ret lzma_outq_init(
|
||||
lzma_outq *outq, const lzma_allocator *allocator,
|
||||
uint64_t buf_size_max, uint32_t threads);
|
||||
|
||||
|
||||
/// \brief Free the memory associated with the output queue
|
||||
extern void lzma_outq_end(lzma_outq *outq, const lzma_allocator *allocator);
|
||||
|
||||
|
||||
/// \brief Get a new buffer
|
||||
///
|
||||
/// lzma_outq_has_buf() must be used to check that there is a buffer
|
||||
/// available before calling lzma_outq_get_buf().
|
||||
///
|
||||
extern lzma_outbuf *lzma_outq_get_buf(lzma_outq *outq);
|
||||
|
||||
|
||||
/// \brief Test if there is data ready to be read
|
||||
///
|
||||
/// Call to this function must be protected with the same mutex that
|
||||
/// is used to protect lzma_outbuf.finished.
|
||||
///
|
||||
extern bool lzma_outq_is_readable(const lzma_outq *outq);
|
||||
|
||||
|
||||
/// \brief Read finished data
|
||||
///
|
||||
/// \param outq Pointer to an output queue
|
||||
/// \param out Beginning of the output buffer
|
||||
/// \param out_pos The next byte will be written to
|
||||
/// out[*out_pos].
|
||||
/// \param out_size Size of the out buffer; the first byte into
|
||||
/// which no data is written to is out[out_size].
|
||||
/// \param unpadded_size Unpadded Size from the Block encoder
|
||||
/// \param uncompressed_size Uncompressed Size from the Block encoder
|
||||
///
|
||||
/// \return - LZMA: All OK. Either no data was available or the buffer
|
||||
/// being read didn't become empty yet.
|
||||
/// - LZMA_STREAM_END: The buffer being read was finished.
|
||||
/// *unpadded_size and *uncompressed_size were set.
|
||||
///
|
||||
/// \note This reads lzma_outbuf.finished variables and thus call
|
||||
/// to this function needs to be protected with a mutex.
|
||||
///
|
||||
extern lzma_ret lzma_outq_read(lzma_outq *restrict outq,
|
||||
uint8_t *restrict out, size_t *restrict out_pos,
|
||||
size_t out_size, lzma_vli *restrict unpadded_size,
|
||||
lzma_vli *restrict uncompressed_size);
|
||||
|
||||
|
||||
/// \brief Test if there is at least one buffer free
|
||||
///
|
||||
/// This must be used before getting a new buffer with lzma_outq_get_buf().
|
||||
///
|
||||
static inline bool
|
||||
lzma_outq_has_buf(const lzma_outq *outq)
|
||||
{
|
||||
return outq->bufs_used < outq->bufs_allocated;
|
||||
}
|
||||
|
||||
|
||||
/// \brief Test if the queue is completely empty
|
||||
static inline bool
|
||||
lzma_outq_is_empty(const lzma_outq *outq)
|
||||
{
|
||||
return outq->bufs_used == 0;
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_stream_buffer_decode(uint64_t *memlimit, uint32_t flags,
|
||||
const lzma_allocator *allocator,
|
||||
lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
{
|
||||
|
||||
@@ -42,8 +42,7 @@ lzma_stream_buffer_bound(size_t uncompressed_size)
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check,
|
||||
const lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size,
|
||||
lzma_allocator *allocator, const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos_ptr, size_t out_size)
|
||||
{
|
||||
// Sanity checks
|
||||
|
||||
@@ -57,10 +57,6 @@ struct lzma_coder_s {
|
||||
/// If true, LZMA_GET_CHECK is returned after decoding Stream Header.
|
||||
bool tell_any_check;
|
||||
|
||||
/// If true, we will tell the Block decoder to skip calculating
|
||||
/// and verifying the integrity check.
|
||||
bool ignore_check;
|
||||
|
||||
/// If true, we will decode concatenated Streams that possibly have
|
||||
/// Stream Padding between or after them. LZMA_STREAM_END is returned
|
||||
/// once the application isn't giving us any new input, and we aren't
|
||||
@@ -84,7 +80,7 @@ struct lzma_coder_s {
|
||||
|
||||
|
||||
static lzma_ret
|
||||
stream_decoder_reset(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
stream_decoder_reset(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
// Initialize the Index hash used to verify the Index.
|
||||
coder->index_hash = lzma_index_hash_init(coder->index_hash, allocator);
|
||||
@@ -100,7 +96,7 @@ stream_decoder_reset(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
|
||||
|
||||
static lzma_ret
|
||||
stream_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
stream_decode(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size, lzma_action action)
|
||||
@@ -186,8 +182,8 @@ stream_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
|
||||
coder->pos = 0;
|
||||
|
||||
// Version 1 is needed to support the .ignore_check option.
|
||||
coder->block_options.version = 1;
|
||||
// Version 0 is currently the only possible version.
|
||||
coder->block_options.version = 0;
|
||||
|
||||
// Set up a buffer to hold the filter chain. Block Header
|
||||
// decoder will initialize all members of this array so
|
||||
@@ -199,11 +195,6 @@ stream_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
return_if_error(lzma_block_header_decode(&coder->block_options,
|
||||
allocator, coder->buffer));
|
||||
|
||||
// If LZMA_IGNORE_CHECK was used, this flag needs to be set.
|
||||
// It has to be set after lzma_block_header_decode() because
|
||||
// it always resets this to false.
|
||||
coder->block_options.ignore_check = coder->ignore_check;
|
||||
|
||||
// Check the memory usage limit.
|
||||
const uint64_t memusage = lzma_raw_decoder_memusage(filters);
|
||||
lzma_ret ret;
|
||||
@@ -375,7 +366,7 @@ stream_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
static void
|
||||
stream_decoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
stream_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
lzma_next_end(&coder->block_decoder, allocator);
|
||||
lzma_index_hash_end(coder->index_hash, allocator);
|
||||
@@ -410,8 +401,7 @@ stream_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_stream_decoder_init(
|
||||
lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_stream_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
uint64_t memlimit, uint32_t flags)
|
||||
{
|
||||
lzma_next_coder_init(&lzma_stream_decoder_init, next, allocator);
|
||||
@@ -442,7 +432,6 @@ lzma_stream_decoder_init(
|
||||
next->coder->tell_unsupported_check
|
||||
= (flags & LZMA_TELL_UNSUPPORTED_CHECK) != 0;
|
||||
next->coder->tell_any_check = (flags & LZMA_TELL_ANY_CHECK) != 0;
|
||||
next->coder->ignore_check = (flags & LZMA_IGNORE_CHECK) != 0;
|
||||
next->coder->concatenated = (flags & LZMA_CONCATENATED) != 0;
|
||||
next->coder->first_stream = true;
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
extern lzma_ret lzma_stream_decoder_init(
|
||||
lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
uint64_t memlimit, uint32_t flags);
|
||||
extern lzma_ret lzma_stream_decoder_init(lzma_next_coder *next,
|
||||
lzma_allocator *allocator, uint64_t memlimit, uint32_t flags);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stream_encoder.h"
|
||||
#include "block_encoder.h"
|
||||
#include "index_encoder.h"
|
||||
|
||||
@@ -25,7 +26,7 @@ struct lzma_coder_s {
|
||||
} sequence;
|
||||
|
||||
/// True if Block encoder has been initialized by
|
||||
/// stream_encoder_init() or stream_encoder_update()
|
||||
/// lzma_stream_encoder_init() or stream_encoder_update()
|
||||
/// and thus doesn't need to be initialized in stream_encode().
|
||||
bool block_encoder_is_initialized;
|
||||
|
||||
@@ -59,7 +60,7 @@ struct lzma_coder_s {
|
||||
|
||||
|
||||
static lzma_ret
|
||||
block_encoder_init(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
block_encoder_init(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
// Prepare the Block options. Even though Block encoder doesn't need
|
||||
// compressed_size, uncompressed_size, and header_size to be
|
||||
@@ -78,7 +79,7 @@ block_encoder_init(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
|
||||
|
||||
static lzma_ret
|
||||
stream_encode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
stream_encode(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size, lzma_action action)
|
||||
@@ -125,7 +126,7 @@ stream_encode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
}
|
||||
|
||||
// Initialize the Block encoder unless it was already
|
||||
// initialized by stream_encoder_init() or
|
||||
// initialized by lzma_stream_encoder_init() or
|
||||
// stream_encoder_update().
|
||||
if (!coder->block_encoder_is_initialized)
|
||||
return_if_error(block_encoder_init(coder, allocator));
|
||||
@@ -146,12 +147,11 @@ stream_encode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
}
|
||||
|
||||
case SEQ_BLOCK_ENCODE: {
|
||||
static const lzma_action convert[LZMA_ACTION_MAX + 1] = {
|
||||
static const lzma_action convert[4] = {
|
||||
LZMA_RUN,
|
||||
LZMA_SYNC_FLUSH,
|
||||
LZMA_FINISH,
|
||||
LZMA_FINISH,
|
||||
LZMA_FINISH,
|
||||
};
|
||||
|
||||
const lzma_ret ret = coder->block_encoder.code(
|
||||
@@ -209,7 +209,7 @@ stream_encode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
static void
|
||||
stream_encoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
stream_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
lzma_next_end(&coder->block_encoder, allocator);
|
||||
lzma_next_end(&coder->index_encoder, allocator);
|
||||
@@ -224,7 +224,7 @@ stream_encoder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
|
||||
|
||||
static lzma_ret
|
||||
stream_encoder_update(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
stream_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const lzma_filter *filters,
|
||||
const lzma_filter *reversed_filters)
|
||||
{
|
||||
@@ -262,11 +262,11 @@ stream_encoder_update(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
}
|
||||
|
||||
|
||||
static lzma_ret
|
||||
stream_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
extern lzma_ret
|
||||
lzma_stream_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter *filters, lzma_check check)
|
||||
{
|
||||
lzma_next_coder_init(&stream_encoder_init, next, allocator);
|
||||
lzma_next_coder_init(&lzma_stream_encoder_init, next, allocator);
|
||||
|
||||
if (filters == NULL)
|
||||
return LZMA_PROG_ERROR;
|
||||
@@ -320,12 +320,11 @@ extern LZMA_API(lzma_ret)
|
||||
lzma_stream_encoder(lzma_stream *strm,
|
||||
const lzma_filter *filters, lzma_check check)
|
||||
{
|
||||
lzma_next_strm_init(stream_encoder_init, strm, filters, check);
|
||||
lzma_next_strm_init(lzma_stream_encoder_init, strm, filters, check);
|
||||
|
||||
strm->internal->supported_actions[LZMA_RUN] = true;
|
||||
strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
|
||||
strm->internal->supported_actions[LZMA_FULL_FLUSH] = true;
|
||||
strm->internal->supported_actions[LZMA_FULL_BARRIER] = true;
|
||||
strm->internal->supported_actions[LZMA_FINISH] = true;
|
||||
|
||||
return LZMA_OK;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file hardware_cputhreads.c
|
||||
/// \brief Get the number of CPU threads or cores
|
||||
/// \file stream_encoder.h
|
||||
/// \brief Encodes .xz Streams
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
@@ -10,13 +10,14 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LZMA_STREAM_ENCODER_H
|
||||
#define LZMA_STREAM_ENCODER_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "tuklib_cpucores.h"
|
||||
|
||||
extern lzma_ret lzma_stream_encoder_init(
|
||||
lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter *filters, lzma_check check);
|
||||
|
||||
extern LZMA_API(uint32_t)
|
||||
lzma_cputhreads(void)
|
||||
{
|
||||
return tuklib_cpucores();
|
||||
}
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
static void
|
||||
delta_coder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
delta_coder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
{
|
||||
lzma_next_end(&coder->next, allocator);
|
||||
lzma_free(coder, allocator);
|
||||
@@ -24,7 +24,7 @@ delta_coder_end(lzma_coder *coder, const lzma_allocator *allocator)
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_delta_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_delta_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter_info *filters)
|
||||
{
|
||||
// Allocate memory for the decoder if needed.
|
||||
|
||||
@@ -27,7 +27,7 @@ decode_buffer(lzma_coder *coder, uint8_t *buffer, size_t size)
|
||||
|
||||
|
||||
static lzma_ret
|
||||
delta_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
delta_decode(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size, lzma_action action)
|
||||
@@ -47,7 +47,7 @@ delta_decode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_delta_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_delta_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter_info *filters)
|
||||
{
|
||||
next->code = &delta_decode;
|
||||
@@ -56,7 +56,7 @@ lzma_delta_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_delta_props_decode(void **options, const lzma_allocator *allocator,
|
||||
lzma_delta_props_decode(void **options, lzma_allocator *allocator,
|
||||
const uint8_t *props, size_t props_size)
|
||||
{
|
||||
if (props_size != 1)
|
||||
|
||||
@@ -16,11 +16,10 @@
|
||||
#include "delta_common.h"
|
||||
|
||||
extern lzma_ret lzma_delta_decoder_init(lzma_next_coder *next,
|
||||
const lzma_allocator *allocator,
|
||||
const lzma_filter_info *filters);
|
||||
lzma_allocator *allocator, const lzma_filter_info *filters);
|
||||
|
||||
extern lzma_ret lzma_delta_props_decode(
|
||||
void **options, const lzma_allocator *allocator,
|
||||
void **options, lzma_allocator *allocator,
|
||||
const uint8_t *props, size_t props_size);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -49,7 +49,7 @@ encode_in_place(lzma_coder *coder, uint8_t *buffer, size_t size)
|
||||
|
||||
|
||||
static lzma_ret
|
||||
delta_encode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
delta_encode(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size, lzma_action action)
|
||||
@@ -84,7 +84,7 @@ delta_encode(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
static lzma_ret
|
||||
delta_encoder_update(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
delta_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const lzma_filter *filters_null lzma_attribute((__unused__)),
|
||||
const lzma_filter *reversed_filters)
|
||||
{
|
||||
@@ -97,7 +97,7 @@ delta_encoder_update(lzma_coder *coder, const lzma_allocator *allocator,
|
||||
|
||||
|
||||
extern lzma_ret
|
||||
lzma_delta_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_delta_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter_info *filters)
|
||||
{
|
||||
next->code = &delta_encode;
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
#include "delta_common.h"
|
||||
|
||||
extern lzma_ret lzma_delta_encoder_init(lzma_next_coder *next,
|
||||
const lzma_allocator *allocator,
|
||||
const lzma_filter_info *filters);
|
||||
lzma_allocator *allocator, const lzma_filter_info *filters);
|
||||
|
||||
extern lzma_ret lzma_delta_props_encode(const void *options, uint8_t *out);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ struct lzma_coder_s {
|
||||
|
||||
|
||||
extern lzma_ret lzma_delta_coder_init(
|
||||
lzma_next_coder *next, const lzma_allocator *allocator,
|
||||
lzma_next_coder *next, lzma_allocator *allocator,
|
||||
const lzma_filter_info *filters);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
XZ_5.0 {
|
||||
global:
|
||||
lzma_alone_decoder;
|
||||
lzma_alone_encoder;
|
||||
lzma_auto_decoder;
|
||||
lzma_block_buffer_bound;
|
||||
lzma_block_buffer_decode;
|
||||
lzma_block_buffer_encode;
|
||||
lzma_block_compressed_size;
|
||||
lzma_block_decoder;
|
||||
lzma_block_encoder;
|
||||
lzma_block_header_decode;
|
||||
lzma_block_header_encode;
|
||||
lzma_block_header_size;
|
||||
lzma_block_total_size;
|
||||
lzma_block_unpadded_size;
|
||||
lzma_check_is_supported;
|
||||
lzma_check_size;
|
||||
lzma_code;
|
||||
lzma_crc32;
|
||||
lzma_crc64;
|
||||
lzma_easy_buffer_encode;
|
||||
lzma_easy_decoder_memusage;
|
||||
lzma_easy_encoder;
|
||||
lzma_easy_encoder_memusage;
|
||||
lzma_end;
|
||||
lzma_filter_decoder_is_supported;
|
||||
lzma_filter_encoder_is_supported;
|
||||
lzma_filter_flags_decode;
|
||||
lzma_filter_flags_encode;
|
||||
lzma_filter_flags_size;
|
||||
lzma_filters_copy;
|
||||
lzma_filters_update;
|
||||
lzma_get_check;
|
||||
lzma_index_append;
|
||||
lzma_index_block_count;
|
||||
lzma_index_buffer_decode;
|
||||
lzma_index_buffer_encode;
|
||||
lzma_index_cat;
|
||||
lzma_index_checks;
|
||||
lzma_index_decoder;
|
||||
lzma_index_dup;
|
||||
lzma_index_encoder;
|
||||
lzma_index_end;
|
||||
lzma_index_file_size;
|
||||
lzma_index_hash_append;
|
||||
lzma_index_hash_decode;
|
||||
lzma_index_hash_end;
|
||||
lzma_index_hash_init;
|
||||
lzma_index_hash_size;
|
||||
lzma_index_init;
|
||||
lzma_index_iter_init;
|
||||
lzma_index_iter_locate;
|
||||
lzma_index_iter_next;
|
||||
lzma_index_iter_rewind;
|
||||
lzma_index_memusage;
|
||||
lzma_index_memused;
|
||||
lzma_index_size;
|
||||
lzma_index_stream_count;
|
||||
lzma_index_stream_flags;
|
||||
lzma_index_stream_padding;
|
||||
lzma_index_stream_size;
|
||||
lzma_index_total_size;
|
||||
lzma_index_uncompressed_size;
|
||||
lzma_lzma_preset;
|
||||
lzma_memlimit_get;
|
||||
lzma_memlimit_set;
|
||||
lzma_memusage;
|
||||
lzma_mf_is_supported;
|
||||
lzma_mode_is_supported;
|
||||
lzma_physmem;
|
||||
lzma_properties_decode;
|
||||
lzma_properties_encode;
|
||||
lzma_properties_size;
|
||||
lzma_raw_buffer_decode;
|
||||
lzma_raw_buffer_encode;
|
||||
lzma_raw_decoder;
|
||||
lzma_raw_decoder_memusage;
|
||||
lzma_raw_encoder;
|
||||
lzma_raw_encoder_memusage;
|
||||
lzma_stream_buffer_bound;
|
||||
lzma_stream_buffer_decode;
|
||||
lzma_stream_buffer_encode;
|
||||
lzma_stream_decoder;
|
||||
lzma_stream_encoder;
|
||||
lzma_stream_flags_compare;
|
||||
lzma_stream_footer_decode;
|
||||
lzma_stream_footer_encode;
|
||||
lzma_stream_header_decode;
|
||||
lzma_stream_header_encode;
|
||||
lzma_version_number;
|
||||
lzma_version_string;
|
||||
lzma_vli_decode;
|
||||
lzma_vli_encode;
|
||||
lzma_vli_size;
|
||||
};
|
||||
|
||||
XZ_5.2 {
|
||||
global:
|
||||
lzma_block_uncomp_encode;
|
||||
lzma_cputhreads;
|
||||
lzma_get_progress;
|
||||
lzma_stream_encoder_mt;
|
||||
lzma_stream_encoder_mt_memusage;
|
||||
|
||||
local:
|
||||
*;
|
||||
} XZ_5.0;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user