[*] Updated from v5.4.1 to v6.0.1. Minor license change from "Public Domain" to 0BSD.
Note much of these MODIFIED files still fall into the Public-Domain dedication (they have not been changed or worked on since they were announced PD)
This commit is contained in:
parent
d0797bfea8
commit
3327de4d91
553
NEWS
553
NEWS
@ -2,6 +2,516 @@
|
||||
XZ Utils Release Notes
|
||||
======================
|
||||
|
||||
5.6.1 (2024-03-09)
|
||||
|
||||
* liblzma: Fixed two bugs relating to GNU indirect function (IFUNC)
|
||||
with GCC. The more serious bug caused a program linked with
|
||||
liblzma to crash on start up if the flag -fprofile-generate was
|
||||
used to build liblzma. The second bug caused liblzma to falsely
|
||||
report an invalid write to Valgrind when loading liblzma.
|
||||
|
||||
* xz: Changed the messages for thread reduction due to memory
|
||||
constraints to only appear under the highest verbosity level.
|
||||
|
||||
* Build:
|
||||
|
||||
- Fixed a build issue when the header file <linux/landlock.h>
|
||||
was present on the system but the Landlock system calls were
|
||||
not defined in <sys/syscall.h>.
|
||||
|
||||
- The CMake build now warns and disables NLS if both gettext
|
||||
tools and pre-created .gmo files are missing. Previously,
|
||||
this caused the CMake build to fail.
|
||||
|
||||
* Minor improvements to man pages.
|
||||
|
||||
* Minor improvements to tests.
|
||||
|
||||
|
||||
5.6.0 (2024-02-24)
|
||||
|
||||
This bumps the minor version of liblzma because new features were
|
||||
added. The API and ABI are still backward compatible with liblzma
|
||||
5.4.x and 5.2.x and 5.0.x.
|
||||
|
||||
NOTE: As described in the NEWS for 5.5.2beta, the core components
|
||||
are now under the BSD Zero Clause License (0BSD).
|
||||
|
||||
Since 5.5.2beta:
|
||||
|
||||
* liblzma:
|
||||
|
||||
- Disabled the branchless C variant in the LZMA decoder based
|
||||
on the benchmark results from the community.
|
||||
|
||||
- Disabled x86-64 inline assembly on x32 to fix the build.
|
||||
|
||||
* Sandboxing support in xz:
|
||||
|
||||
- Landlock is now used even when xz needs to create files.
|
||||
In this case the sandbox has to be more permissive than
|
||||
when no files need to be created. A similar thing was
|
||||
already in use with pledge(2) since 5.3.4alpha.
|
||||
|
||||
- Landlock and pledge(2) are now stricter when reading from
|
||||
more than one input file and only writing to standard output.
|
||||
|
||||
- Added support for Landlock ABI version 4.
|
||||
|
||||
* CMake:
|
||||
|
||||
- Default to -O2 instead of -O3 with CMAKE_BUILD_TYPE=Release.
|
||||
-O3 is not useful for speed and makes the code larger.
|
||||
|
||||
- Now builds lzmainfo and lzmadec.
|
||||
|
||||
- xzdiff, xzgrep, xzless, xzmore, and their symlinks are now
|
||||
installed. The scripts are also tested during "make test".
|
||||
|
||||
- Added translation support for xz, lzmainfo, and the
|
||||
man pages.
|
||||
|
||||
- Applied the symbol versioning workaround for MicroBlaze that
|
||||
is used in the Autotools build.
|
||||
|
||||
- The general XZ Utils and liblzma API documentation is now
|
||||
installed.
|
||||
|
||||
- The CMake component names were changed a little and several
|
||||
were added. liblzma_Runtime and liblzma_Development are
|
||||
unchanged.
|
||||
|
||||
- Minimum required CMake version is now 3.14. However,
|
||||
translation support is disabled with CMake versions
|
||||
older than 3.20.
|
||||
|
||||
- The CMake-based build is now close to feature parity with the
|
||||
Autotools-based build. Most importantly a few tests aren't
|
||||
run yet. Testing the CMake-based build on different operating
|
||||
systems would be welcome now. See the comment at the top of
|
||||
CMakeLists.txt.
|
||||
|
||||
* Fixed a bug in the Autotools feature test for ARM64 CRC32
|
||||
instruction support for old versions of Clang. This did not
|
||||
affect the CMake build.
|
||||
|
||||
* Windows:
|
||||
|
||||
- The build instructions in INSTALL and windows/INSTALL*.txt
|
||||
were revised completely.
|
||||
|
||||
- windows/build-with-cmake.bat along with the instructions
|
||||
in windows/INSTALL-MinGW-w64_with_CMake.txt should make
|
||||
it very easy to build liblzma.dll and xz.exe on Windows
|
||||
using CMake and MinGW-w64 with either GCC or Clang/LLVM.
|
||||
|
||||
- windows/build.bash was updated. It now works on MSYS2 and
|
||||
on GNU/Linux (cross-compiling) to create a .zip and .7z
|
||||
package for 32-bit and 64-bit x86 using GCC + MinGW-w64.
|
||||
|
||||
* The TODO file is no longer installed as part of the
|
||||
documentation. The file is out of date and does not reflect
|
||||
the actual tasks that will be completed in the future.
|
||||
|
||||
* Translations:
|
||||
|
||||
- Translated lzmainfo man pages are now installed. These
|
||||
had been forgotten in earlier versions.
|
||||
|
||||
- Updated Croatian, Esperanto, German, Hungarian, Korean,
|
||||
Polish, Romanian, Spanish, Swedish, Vietnamese, and Ukrainian
|
||||
translations.
|
||||
|
||||
- Updated German, Korean, Romanian, and Ukrainian man page
|
||||
translations.
|
||||
|
||||
* Added a few tests.
|
||||
|
||||
Summary of new features added in the 5.5.x development releases:
|
||||
|
||||
* liblzma:
|
||||
|
||||
- LZMA decoder: Speed optimizations to the C code and
|
||||
added GCC & Clang compatible inline assembly for x86-64.
|
||||
|
||||
- Added lzma_mt_block_size() to recommend a Block size for
|
||||
multithreaded encoding.
|
||||
|
||||
- Added CLMUL-based CRC32 on x86-64 and E2K with runtime
|
||||
processor detection. Similar to CRC64, on 32-bit x86 it
|
||||
isn't available unless --disable-assembler is used.
|
||||
|
||||
- Optimized the CRC32 calculation on ARM64 platforms using the
|
||||
CRC32 instructions. Runtime detection for the instruction is
|
||||
used on GNU/Linux, FreeBSD, Windows, and macOS. If the
|
||||
compiler flags indicate unconditional CRC32 instruction
|
||||
support (+crc) then the generic version is not built.
|
||||
|
||||
- Added definitions of mask values like
|
||||
LZMA_INDEX_CHECK_MASK_CRC32 to <lzma/index.h>.
|
||||
|
||||
* xz:
|
||||
|
||||
- Multithreaded mode is now the default. This improves
|
||||
compression speed and creates .xz files that can be
|
||||
decompressed in multithreaded mode. The downsides are
|
||||
increased memory usage and slightly worse compression ratio.
|
||||
|
||||
- Added a new command line option --filters to set the filter
|
||||
chain using the liblzma filter string syntax.
|
||||
|
||||
- Added new command line options --filters1 ... --filters9 to
|
||||
set additional filter chains using the liblzma filter string
|
||||
syntax. The --block-list option now allows specifying filter
|
||||
chains that were set using these new options.
|
||||
|
||||
- Ported the command line tools to Windows MSVC.
|
||||
Visual Studio 2015 or later is required.
|
||||
|
||||
* Added lz4 support to xzdiff/xzcmp and xzgrep.
|
||||
|
||||
|
||||
5.5.2beta (2024-02-14)
|
||||
|
||||
* Licensing change: The core components are now under the
|
||||
BSD Zero Clause License (0BSD). In XZ Utils 5.4.6 and older
|
||||
and 5.5.1alpha these components are in the public domain and
|
||||
obviously remain so; the change affects the new releases only.
|
||||
|
||||
0BSD is an extremely permissive license which doesn't require
|
||||
retaining or reproducing copyright or license notices when
|
||||
distributing the code, thus in practice there is extremely
|
||||
little difference to public domain.
|
||||
|
||||
* liblzma
|
||||
|
||||
- Significant speed optimizations to the LZMA decoder were
|
||||
made. There are now three variants that can be chosen at
|
||||
build time:
|
||||
|
||||
* Basic C version: This is a few percent faster than
|
||||
5.4.x due to some new optimizations.
|
||||
|
||||
* Branchless C: This is currently the default on platforms
|
||||
for which there is no assembly code. This should be a few
|
||||
percent faster than the basic C version.
|
||||
|
||||
* x86-64 inline assembly. This works with GCC and Clang.
|
||||
|
||||
The default choice can currently be overridden by setting
|
||||
LZMA_RANGE_DECODER_CONFIG in CPPFLAGS: 0 means the basic
|
||||
version and 3 means that branchless C version.
|
||||
|
||||
- Optimized the CRC32 calculation on ARM64 platforms using the
|
||||
CRC32 instructions. The instructions are optional in ARMv8.0
|
||||
and are required in ARMv8.1 and later. Runtime detection for
|
||||
the instruction is used on GNU/Linux, FreeBSD, Windows, and
|
||||
macOS. If the compiler flags indicate unconditional CRC32
|
||||
instruction support (+crc) then the generic version is not
|
||||
built.
|
||||
|
||||
* Added lz4 support to xzdiff/xzcmp and xzgrep.
|
||||
|
||||
* Man pages of xzdiff/xzcmp, xzgrep, and xzmore were rewritten
|
||||
to simplify licensing of the man page translations.
|
||||
|
||||
* Translations:
|
||||
|
||||
- Updated Chinese (simplified), German, Korean, Polish,
|
||||
Romanian, Spanish, Swedish, and Ukrainian translations.
|
||||
|
||||
- Updated German, Korean, Romanian, and Ukrainian man page
|
||||
translations.
|
||||
|
||||
* Small improvements to the tests.
|
||||
|
||||
* Added doc/examples/11_file_info.c. It was added to the Git
|
||||
repository in 2017 but forgotten to be added into distribution
|
||||
tarballs.
|
||||
|
||||
* Removed doc/examples_old. These were from 2012.
|
||||
|
||||
* Removed the macos/build.sh script. It had not been updated
|
||||
since 2013.
|
||||
|
||||
|
||||
5.5.1alpha (2024-01-26)
|
||||
|
||||
* Added a new filter for RISC-V binaries. The filter can be used
|
||||
for 32-bit and 64-bit binaries with either little or big
|
||||
endianness. In liblzma, the Filter ID is LZMA_FILTER_RISCV (0x0B)
|
||||
and the xz option is --riscv. liblzma filter string syntax
|
||||
recognizes this filter as "riscv".
|
||||
|
||||
* liblzma:
|
||||
|
||||
- Added lzma_mt_block_size() to recommend a Block size for
|
||||
multithreaded encoding
|
||||
|
||||
- Added CLMUL-based CRC32 on x86-64 and E2K with runtime
|
||||
processor detection. Similar to CRC64, on 32-bit x86 it
|
||||
isn't available unless --disable-assembler is used.
|
||||
|
||||
- Implemented GNU indirect function (IFUNC) as a runtime
|
||||
function dispatching method for CRC32 and CRC64 fast
|
||||
implementations on x86. Only GNU/Linux (glibc) and FreeBSD
|
||||
builds will use IFUNC, unless --enable-ifunc is specified to
|
||||
configure.
|
||||
|
||||
- Added definitions of mask values like
|
||||
LZMA_INDEX_CHECK_MASK_CRC32 to <lzma/index.h>.
|
||||
|
||||
- The XZ logo is now included in the Doxygen generated
|
||||
documentation. It is licensed under Creative Commons
|
||||
Attribution-ShareAlike 4.0.
|
||||
|
||||
* xz:
|
||||
|
||||
- Multithreaded mode is now the default. This improves
|
||||
compression speed and creates .xz files that can be
|
||||
decompressed multithreaded at the cost of increased memory
|
||||
usage and slightly worse compression ratio.
|
||||
|
||||
- Added new command line option --filters to set the filter
|
||||
chain using liblzma filter string syntax.
|
||||
|
||||
- Added new command line options --filters1 ... --filters9 to
|
||||
set additional filter chains using liblzma filter string
|
||||
syntax. The --block-list option now allows specifying filter
|
||||
chains that were set using these new options.
|
||||
|
||||
- Added support for Linux Landlock as a sandboxing method.
|
||||
|
||||
- xzdec now supports pledge(2), Capsicum, and Linux Landlock as
|
||||
sandboxing methods.
|
||||
|
||||
- Progress indicator time stats remain accurate after pausing
|
||||
xz with SIGTSTP.
|
||||
|
||||
- Ported xz and xzdec to Windows MSVC. Visual Studio 2015 or
|
||||
later is required.
|
||||
|
||||
* CMake Build:
|
||||
|
||||
- Supports pledge(2), Capsicum, and Linux Landlock sandboxing
|
||||
methods.
|
||||
|
||||
- Replacement functions for getopt_long() are used on platforms
|
||||
that do not have it.
|
||||
|
||||
* Enabled unaligned access by default on PowerPC64LE and on RISC-V
|
||||
targets that define __riscv_misaligned_fast.
|
||||
|
||||
* Tests:
|
||||
|
||||
- Added two new fuzz targets to OSS-Fuzz.
|
||||
|
||||
- Implemented Continuous Integration (CI) testing using
|
||||
GitHub Actions.
|
||||
|
||||
* Changed quoting style from `...' to '...' in all messages,
|
||||
scripts, and documentation.
|
||||
|
||||
* Added basic Codespell support to help catch typo errors.
|
||||
|
||||
|
||||
5.4.6 (2024-01-26)
|
||||
|
||||
* Fixed a bug involving internal function pointers in liblzma not
|
||||
being initialized to NULL. The bug can only be triggered if
|
||||
lzma_filters_update() is called on a LZMA1 encoder, so it does
|
||||
not affect xz or any application known to us that uses liblzma.
|
||||
|
||||
* xz:
|
||||
|
||||
- Fixed a regression introduced in 5.4.2 that caused encoding
|
||||
in the raw format to unnecessarily fail if --suffix was not
|
||||
used. For instance, the following command no longer reports
|
||||
that --suffix must be used:
|
||||
|
||||
echo foo | xz --format=raw --lzma2 | wc -c
|
||||
|
||||
- Fixed an issue on MinGW-w64 builds that prevented reading
|
||||
from or writing to non-terminal character devices like NUL.
|
||||
|
||||
* Added a new test.
|
||||
|
||||
|
||||
5.4.5 (2023-11-31)
|
||||
|
||||
* liblzma:
|
||||
|
||||
- Use __attribute__((__no_sanitize_address__)) to avoid address
|
||||
sanitization with CRC64 CLMUL. It uses 16-byte-aligned reads
|
||||
which can extend past the bounds of the input buffer and
|
||||
inherently trigger address sanitization errors. This isn't
|
||||
a bug.
|
||||
|
||||
- Fixed an assertion failure that could be triggered by a large
|
||||
unpadded_size argument. It was verified that there was no
|
||||
other bug than the assertion failure.
|
||||
|
||||
- Fixed a bug that prevented building with Windows Vista
|
||||
threading when __attribute__((__constructor__)) is not
|
||||
supported.
|
||||
|
||||
* xz now properly handles special files such as "con" or "nul" on
|
||||
Windows. Before this fix, the following wrote "foo" to the
|
||||
console and deleted the input file "con_xz":
|
||||
|
||||
echo foo | xz > con_xz
|
||||
xz --suffix=_xz --decompress con_xz
|
||||
|
||||
* Build systems:
|
||||
|
||||
- Allow builds with Windows win95 threading and small mode when
|
||||
__attribute__((__constructor__)) is supported.
|
||||
|
||||
- Added a new line to liblzma.pc for MSYS2 (Windows):
|
||||
|
||||
Cflags.private: -DLZMA_API_STATIC
|
||||
|
||||
When compiling code that will link against static liblzma,
|
||||
the LZMA_API_STATIC macro needs to be defined on Windows.
|
||||
|
||||
- CMake specific changes:
|
||||
|
||||
* Fixed a bug that allowed CLOCK_MONOTONIC to be used even
|
||||
if the check for it failed.
|
||||
|
||||
* Fixed a bug where configuring CMake multiple times
|
||||
resulted in HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC
|
||||
not being set.
|
||||
|
||||
* Fixed the build with MinGW-w64-based Clang/LLVM 17.
|
||||
llvm-windres now has more accurate GNU windres emulation
|
||||
so the GNU windres workaround from 5.4.1 is needed with
|
||||
llvm-windres version 17 too.
|
||||
|
||||
* The import library on Windows is now properly named
|
||||
"liblzma.dll.a" instead of "libliblzma.dll.a"
|
||||
|
||||
* Fixed a bug causing the Ninja Generator to fail on
|
||||
UNIX-like systems. This bug was introduced in 5.4.0.
|
||||
|
||||
* Added a new option to disable CLMUL CRC64.
|
||||
|
||||
* A module-definition (.def) file is now created when
|
||||
building liblzma.dll with MinGW-w64.
|
||||
|
||||
* The pkg-config liblzma.pc file is now installed on all
|
||||
builds except when using MSVC on Windows.
|
||||
|
||||
* Added large file support by default for platforms that
|
||||
need it to handle files larger than 2 GiB. This includes
|
||||
MinGW-w64, even 64-bit builds.
|
||||
|
||||
* Small fixes and improvements to the tests.
|
||||
|
||||
* Updated translations: Chinese (simplified) and Esperanto.
|
||||
|
||||
|
||||
5.4.4 (2023-08-02)
|
||||
|
||||
* liblzma and xzdec can now build against WASI SDK when threading
|
||||
support is disabled. xz and tests don't build yet.
|
||||
|
||||
* CMake:
|
||||
|
||||
- Fixed a bug preventing other projects from including liblzma
|
||||
multiple times using find_package().
|
||||
|
||||
- Don't create broken symlinks in Cygwin and MSYS2 unless
|
||||
supported by the environment. This prevented building for the
|
||||
default MSYS2 environment. The problem was introduced in
|
||||
xz 5.4.0.
|
||||
|
||||
* Documentation:
|
||||
|
||||
- Small improvements to man pages.
|
||||
|
||||
- Small improvements and typo fixes for liblzma API
|
||||
documentation.
|
||||
|
||||
* Tests:
|
||||
|
||||
- Added a new section to INSTALL to describe basic test usage
|
||||
and address recent questions about building the tests when
|
||||
cross compiling.
|
||||
|
||||
- Small fixes and improvements to the tests.
|
||||
|
||||
* Translations:
|
||||
|
||||
- Fixed a mistake that caused one of the error messages to not
|
||||
be translated. This only affected versions 5.4.2 and 5.4.3.
|
||||
|
||||
- Updated the Chinese (simplified), Croatian, Esperanto, German,
|
||||
Korean, Polish, Romanian, Spanish, Swedish, Ukrainian, and
|
||||
Vietnamese translations.
|
||||
|
||||
- Updated the German, Korean, Romanian, and Ukrainian man page
|
||||
translations.
|
||||
|
||||
|
||||
5.4.3 (2023-05-04)
|
||||
|
||||
* All fixes from 5.2.12
|
||||
|
||||
* Features in the CMake build can now be disabled as CMake cache
|
||||
variables, similar to the Autotools build.
|
||||
|
||||
* Minor update to the Croatian translation.
|
||||
|
||||
|
||||
5.4.2 (2023-03-18)
|
||||
|
||||
* All fixes from 5.2.11 that were not included in 5.4.1.
|
||||
|
||||
* If xz is built with support for the Capsicum sandbox but running
|
||||
in an environment that doesn't support Capsicum, xz now runs
|
||||
normally without sandboxing instead of exiting with an error.
|
||||
|
||||
* liblzma:
|
||||
|
||||
- Documentation was updated to improve the style, consistency,
|
||||
and completeness of the liblzma API headers.
|
||||
|
||||
- The Doxygen-generated HTML documentation for the liblzma API
|
||||
header files is now included in the source release and is
|
||||
installed as part of "make install". All JavaScript is
|
||||
removed to simplify license compliance and to reduce the
|
||||
install size.
|
||||
|
||||
- Fixed a minor bug in lzma_str_from_filters() that produced
|
||||
too many filters in the output string instead of reporting
|
||||
an error if the input array had more than four filters. This
|
||||
bug did not affect xz.
|
||||
|
||||
* Build systems:
|
||||
|
||||
- autogen.sh now invokes the doxygen tool via the new wrapper
|
||||
script doxygen/update-doxygen, unless the command line option
|
||||
--no-doxygen is used.
|
||||
|
||||
- Added microlzma_encoder.c and microlzma_decoder.c to the
|
||||
VS project files for Windows and to the CMake build. These
|
||||
should have been included in 5.3.2alpha.
|
||||
|
||||
* Tests:
|
||||
|
||||
- Added a test to the CMake build that was forgotten in the
|
||||
previous release.
|
||||
|
||||
- Added and refactored a few tests.
|
||||
|
||||
* Translations:
|
||||
|
||||
- Updated the Brazilian Portuguese translation.
|
||||
|
||||
- Added Brazilian Portuguese man page translation.
|
||||
|
||||
|
||||
5.4.1 (2023-01-11)
|
||||
|
||||
* liblzma:
|
||||
@ -629,6 +1139,47 @@ XZ Utils Release Notes
|
||||
(FreeBSD >= 10).
|
||||
|
||||
|
||||
5.2.12 (2023-05-04)
|
||||
|
||||
* Fixed a build system bug that prevented building liblzma as a
|
||||
shared library when configured with --disable-threads. This bug
|
||||
affected releases 5.2.6 to 5.2.11 and 5.4.0 to 5.4.2.
|
||||
|
||||
* Include <intrin.h> for Windows intrinsic functions where they are
|
||||
needed. This fixed a bug that prevented building liblzma using
|
||||
clang-cl on Windows.
|
||||
|
||||
* Minor update to the Croatian translation. The small change
|
||||
applies to a string in both 5.2 and 5.4 branches.
|
||||
|
||||
|
||||
5.2.11 (2023-03-18)
|
||||
|
||||
* Removed all possible cases of null pointer + 0. It is undefined
|
||||
behavior in C99 and C17. This was detected by a sanitizer and had
|
||||
not caused any known issues.
|
||||
|
||||
* Build systems:
|
||||
|
||||
- Added a workaround for building with GCC on MicroBlaze Linux.
|
||||
GCC 12 on MicroBlaze doesn't support the __symver__ attribute
|
||||
even though __has_attribute(__symver__) returns true. The
|
||||
build is now done without the extra RHEL/CentOS 7 symbols
|
||||
that were added in XZ Utils 5.2.7. The workaround only
|
||||
applies to the Autotools build (not CMake).
|
||||
|
||||
- CMake: Ensure that the C compiler language is set to C99 or
|
||||
a newer standard.
|
||||
|
||||
- CMake changes from XZ Utils 5.4.1:
|
||||
|
||||
* Added a workaround for a build failure with
|
||||
windres from GNU binutils.
|
||||
|
||||
* Included the Windows resource files in the xz
|
||||
and xzdec build rules.
|
||||
|
||||
|
||||
5.2.10 (2022-12-13)
|
||||
|
||||
* xz: Don't modify argv[] when parsing the --memlimit* and
|
||||
@ -900,7 +1451,7 @@ XZ Utils Release Notes
|
||||
of the deprecated egrep and fgrep commands.
|
||||
|
||||
- Fixed parsing of the options -E, -F, -G, -P, and -X. The
|
||||
problem occurred when multiple options were specied in
|
||||
problem occurred when multiple options were specified in
|
||||
a single argument, for example,
|
||||
|
||||
echo foo | xzgrep -Fe foo
|
||||
|
33
PACKAGERS
33
PACKAGERS
@ -44,6 +44,8 @@ Information to packagers of XZ Utils
|
||||
lzmadec binary for compatibility with LZMA Utils
|
||||
liblzma liblzma.so.*
|
||||
liblzma-devel liblzma.so, liblzma.a, API headers
|
||||
liblzma-doc Doxygen-generated liblzma API docs (HTML),
|
||||
example programs
|
||||
|
||||
|
||||
2. Package description
|
||||
@ -109,20 +111,28 @@ Information to packagers of XZ Utils
|
||||
This package includes the API headers, static library, and
|
||||
other development files related to liblzma.
|
||||
|
||||
liblzma-doc:
|
||||
|
||||
liblzma API documentation in HTML and example usage
|
||||
|
||||
This package includes the Doxygen-generated liblzma API
|
||||
HTML docs and example programs showing how to use liblzma.
|
||||
|
||||
|
||||
3. License
|
||||
----------
|
||||
|
||||
If the package manager supports a license field, you probably should
|
||||
put GPLv2+ there (GNU GPL v2 or later). The interesting parts of
|
||||
XZ Utils are in the public domain, but some less important files
|
||||
ending up into the binary package are under GPLv2+. So it is simplest
|
||||
to just say GPLv2+ if you cannot specify "public domain and GPLv2+".
|
||||
XZ Utils are under the BSD Zero Clause License (0BSD), but some less
|
||||
important files ending up into the binary package are under GPLv2+.
|
||||
So it is simplest to just say GPLv2+ if you cannot specify
|
||||
"BSD0 and GPLv2+".
|
||||
|
||||
If you split XZ Utils into multiple packages as described earlier
|
||||
in this file, liblzma and liblzma-dev packages will contain only
|
||||
public domain code (from XZ Utils at least; compiler or linker may
|
||||
add some third-party code, which may be copyrighted).
|
||||
0BSD-licensed code from XZ Utils (compiler or linker may add some
|
||||
third-party code which may have other licenses).
|
||||
|
||||
|
||||
4. configure options
|
||||
@ -160,12 +170,13 @@ Information to packagers of XZ Utils
|
||||
can be replaced with a symlink if your distro ships with shared
|
||||
copies of the common license texts.
|
||||
|
||||
liblzma API is currently only documented using Doxygen tags in the
|
||||
API headers. It hasn't been tested much how good results Doxygen
|
||||
is able to make from the tags (e.g. Doxyfile might need tweaking,
|
||||
the tagging may need to be improved etc.), so it might be simpler
|
||||
to just let people read docs directly from the .h files for now,
|
||||
and also save quite a bit in package size at the same time.
|
||||
The Doxygen-generated documentation (HTML) for the liblzma API
|
||||
headers is included in the source release and will be installed by
|
||||
"make install" to $docdir/api. All JavaScript is removed to
|
||||
simplify license compliance and to reduce the install size. If the
|
||||
liblzma API documentation is not desired, either run configure with
|
||||
--disable-doc or remove the doc/api directory before running
|
||||
"make install".
|
||||
|
||||
|
||||
6. Extra files
|
||||
|
21
README
21
README
@ -69,15 +69,18 @@ XZ Utils
|
||||
|
||||
README This file
|
||||
|
||||
INSTALL.generic Generic install instructions for those not familiar
|
||||
with packages using GNU Autotools
|
||||
INSTALL.generic Generic install instructions for those not
|
||||
familiar with packages using GNU Autotools
|
||||
INSTALL Installation instructions specific to XZ Utils
|
||||
PACKAGERS Information to packagers of XZ Utils
|
||||
|
||||
COPYING XZ Utils copyright and license information
|
||||
COPYING.0BSD BSD Zero Clause License
|
||||
COPYING.GPLv2 GNU General Public License version 2
|
||||
COPYING.GPLv3 GNU General Public License version 3
|
||||
COPYING.LGPLv2.1 GNU Lesser General Public License version 2.1
|
||||
COPYING.CC-BY-SA-4.0 Creative Commons Attribution-ShareAlike 4.0
|
||||
International Public License
|
||||
|
||||
AUTHORS The main authors of XZ Utils
|
||||
THANKS Incomplete list of people who have helped making
|
||||
@ -113,8 +116,8 @@ XZ Utils
|
||||
Since the liblzma API has similarities to the zlib API, some people
|
||||
may find it useful to read the zlib docs and tutorial too:
|
||||
|
||||
http://zlib.net/manual.html
|
||||
http://zlib.net/zlib_how.html
|
||||
https://zlib.net/manual.html
|
||||
https://zlib.net/zlib_how.html
|
||||
|
||||
|
||||
2. Version numbering
|
||||
@ -281,13 +284,17 @@ XZ Utils
|
||||
7-Zip and the p7zip port of 7-Zip support the .xz format starting
|
||||
from the version 9.00alpha.
|
||||
|
||||
http://7-zip.org/
|
||||
http://p7zip.sourceforge.net/
|
||||
https://7-zip.org/
|
||||
https://p7zip.sourceforge.net/
|
||||
|
||||
XZ Embedded is a limited implementation written for use in the Linux
|
||||
kernel, but it is also suitable for other embedded use.
|
||||
|
||||
https://tukaani.org/xz/embedded.html
|
||||
https://xz.tukaani.org/xz-embedded/
|
||||
|
||||
XZ for Java is a complete implementation written in pure Java.
|
||||
|
||||
https://xz.tukaani.org/xz-for-java/
|
||||
|
||||
|
||||
6. Contact information
|
||||
|
22
THANKS
22
THANKS
@ -5,6 +5,7 @@ Thanks
|
||||
Some people have helped more, some less, but nevertheless everyone's help
|
||||
has been important. :-) In alphabetical order:
|
||||
- Mark Adler
|
||||
- Kian-Meng Ang
|
||||
- H. Peter Anvin
|
||||
- Jeff Bastian
|
||||
- Nelson H. F. Beebe
|
||||
@ -19,10 +20,13 @@ has been important. :-) In alphabetical order:
|
||||
- Jakub Bogusz
|
||||
- Adam Borowski
|
||||
- Maarten Bosmans
|
||||
- Lukas Braune
|
||||
- Benjamin Buch
|
||||
- Trent W. Buck
|
||||
- Kevin R. Bulgrien
|
||||
- James Buren
|
||||
- David Burklund
|
||||
- Frank Busse
|
||||
- Daniel Mealha Cabrita
|
||||
- Milo Casagrande
|
||||
- Marek Černocký
|
||||
@ -39,6 +43,7 @@ has been important. :-) In alphabetical order:
|
||||
- Robert Elz
|
||||
- Gilles Espinasse
|
||||
- Denis Excoffier
|
||||
- Vincent Fazio
|
||||
- Michael Felt
|
||||
- Michael Fox
|
||||
- Mike Frysinger
|
||||
@ -47,9 +52,11 @@ has been important. :-) In alphabetical order:
|
||||
- Bjarni Ingi Gislason
|
||||
- John Paul Adrian Glaubitz
|
||||
- Bill Glessner
|
||||
- Matthew Good
|
||||
- Michał Górny
|
||||
- Jason Gorski
|
||||
- Juan Manuel Guerrero
|
||||
- Gabriela Gutierrez
|
||||
- Diederik de Haas
|
||||
- Joachim Henke
|
||||
- Christian Hesse
|
||||
@ -58,20 +65,26 @@ has been important. :-) In alphabetical order:
|
||||
- Nicholas Jackson
|
||||
- Sam James
|
||||
- Hajin Jang
|
||||
- Hans Jansen
|
||||
- Jouk Jansen
|
||||
- Jun I Jin
|
||||
- Kiyoshi Kanazawa
|
||||
- Joona Kannisto
|
||||
- Per Øyvind Karlsen
|
||||
- Iouri Kharon
|
||||
- Thomas Klausner
|
||||
- Richard Koch
|
||||
- Anton Kochkov
|
||||
- Ville Koskinen
|
||||
- Sergey Kosukhin
|
||||
- Marcin Kowalczyk
|
||||
- Jan Kratochvil
|
||||
- Christian Kujau
|
||||
- Stephan Kulow
|
||||
- Ilya Kurdyukov
|
||||
- Peter Lawler
|
||||
- James M Leddy
|
||||
- Kelvin Lee
|
||||
- Vincent Lefevre
|
||||
- Hin-Tak Leung
|
||||
- Andraž 'ruskie' Levstik
|
||||
@ -82,6 +95,7 @@ has been important. :-) In alphabetical order:
|
||||
- Lorenzo De Liso
|
||||
- H.J. Lu
|
||||
- Bela Lubkin
|
||||
- Chenxi Mao
|
||||
- Gregory Margo
|
||||
- Julien Marrec
|
||||
- Ed Maste
|
||||
@ -99,6 +113,7 @@ has been important. :-) In alphabetical order:
|
||||
- Jonathan Nieder
|
||||
- Andre Noll
|
||||
- Peter O'Gorman
|
||||
- Dimitri Papadopoulos Orfanos
|
||||
- Daniel Packard
|
||||
- Filip Palian
|
||||
- Peter Pallinger
|
||||
@ -121,6 +136,7 @@ has been important. :-) In alphabetical order:
|
||||
- Torsten Rupp
|
||||
- Stephen Sachs
|
||||
- Jukka Salmi
|
||||
- Agostino Sarubbo
|
||||
- Alexandre Sauvé
|
||||
- Benno Schulenberg
|
||||
- Andreas Schwab
|
||||
@ -132,13 +148,16 @@ has been important. :-) In alphabetical order:
|
||||
- Brad Smith
|
||||
- Bruce Stark
|
||||
- Pippijn van Steenhoven
|
||||
- Martin Storsjö
|
||||
- Jonathan Stott
|
||||
- Dan Stromberg
|
||||
- Jia Tan
|
||||
- Vincent Torri
|
||||
- Alexey Tourbin
|
||||
- Paul Townsend
|
||||
- Mohammed Adnène Trojette
|
||||
- Alexey Tourbin
|
||||
- Taiki Tsunekawa
|
||||
- Maksym Vatsyk
|
||||
- Loganaden Velvindron
|
||||
- Patrick J. Volkerding
|
||||
- Martin Väth
|
||||
@ -153,6 +172,7 @@ has been important. :-) In alphabetical order:
|
||||
- Charles Wilson
|
||||
- Lars Wirzenius
|
||||
- Pilorz Wojciech
|
||||
- Chien Wong
|
||||
- Ryan Young
|
||||
- Andreas Zieringer
|
||||
|
||||
|
4
TODO
4
TODO
@ -24,10 +24,6 @@ Known bugs
|
||||
|
||||
tuklib_exit() doesn't block signals => EINTR is possible.
|
||||
|
||||
SIGTSTP is not handled. If xz is stopped, the estimated remaining
|
||||
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.
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# 7z2lzma.bash is very primitive .7z to .lzma converter. The input file must
|
||||
@ -17,9 +18,6 @@
|
||||
#
|
||||
# Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# You can use 7z or 7za, both will work.
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/*
|
||||
scanlzma, scan for lzma compressed data in stdin and echo it to stdout.
|
||||
Copyright (C) 2006 Timo Lindfors
|
||||
|
31
po/.gitignore
vendored
Normal file
31
po/.gitignore
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
# autopoint
|
||||
Makefile.in.in
|
||||
Makevars.template
|
||||
Rules-quot
|
||||
boldquot.sed
|
||||
en@boldquot.header
|
||||
en@quot.header
|
||||
insert-header.sin
|
||||
quot.sed
|
||||
remove-potcdate.sin
|
||||
|
||||
# configure
|
||||
Makefile.in
|
||||
Makefile
|
||||
POTFILES
|
||||
|
||||
# intermediate files (make)
|
||||
stamp-poT
|
||||
xz.po
|
||||
xz.1po
|
||||
xz.2po
|
||||
*.new.po
|
||||
|
||||
# make
|
||||
remove-potcdate.sed
|
||||
xz.mo
|
||||
stamp-po
|
||||
*.gmo
|
||||
|
||||
# cached templates (make)
|
||||
xz.pot
|
53
po/Makevars
53
po/Makevars
@ -1,4 +1,10 @@
|
||||
# SPDX-License-Identifier: FSFUL
|
||||
|
||||
# Makefile variables for PO directory in any package using GNU gettext.
|
||||
#
|
||||
# Copyright (C) 2003-2019 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to use, copy, distribute, and modify it.
|
||||
|
||||
# Usually the message domain is the same as the package name.
|
||||
DOMAIN = $(PACKAGE)
|
||||
@ -8,7 +14,7 @@ subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --no-wrap --package-name='XZ Utils'
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
@ -18,7 +24,14 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER =
|
||||
COPYRIGHT_HOLDER = The XZ Utils authors and contributors
|
||||
|
||||
# This tells whether or not to prepend "GNU " prefix to the package
|
||||
# name that gets inserted into the header of the $(DOMAIN).pot file.
|
||||
# Possible values are "yes", "no", or empty. If it is empty, try to
|
||||
# detect it automatically by scanning the files in $(top_srcdir) for
|
||||
# "GNU packagename" string.
|
||||
PACKAGE_GNU = no
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
@ -40,7 +53,35 @@ MSGID_BUGS_ADDRESS =
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
||||
|
||||
# Although you may need slightly wider terminal than 80 chars, it is
|
||||
# much nicer to edit the output of --help when this is set.
|
||||
XGETTEXT_OPTIONS += --no-wrap
|
||||
MSGMERGE += --no-wrap
|
||||
# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
|
||||
# context. Possible values are "yes" and "no". Set this to yes if the
|
||||
# package uses functions taking also a message context, like pgettext(), or
|
||||
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
|
||||
USE_MSGCTXT = no
|
||||
|
||||
# These options get passed to msgmerge.
|
||||
# Useful options are in particular:
|
||||
# --previous to keep previous msgids of translated messages,
|
||||
# --quiet to reduce the verbosity.
|
||||
MSGMERGE_OPTIONS = --no-wrap
|
||||
|
||||
# These options get passed to msginit.
|
||||
# If you want to disable line wrapping when writing PO files, add
|
||||
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
|
||||
# MSGINIT_OPTIONS.
|
||||
#
|
||||
# Although one may need slightly wider terminal than 80 chars, it is
|
||||
# much nicer to edit the output of --help when --no-wrap is set.
|
||||
MSGINIT_OPTIONS = --no-wrap
|
||||
|
||||
# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
|
||||
# has changed. Possible values are "yes" and "no". Set this to no if
|
||||
# the POT file is checked in the repository and the version control
|
||||
# program ignores timestamps.
|
||||
PO_DEPENDS_ON_POT = yes
|
||||
|
||||
# This tells whether or not to forcibly update $(DOMAIN).pot and
|
||||
# regenerate PO files on "make dist". Possible values are "yes" and
|
||||
# "no". Set this to no if the POT file and PO files are maintained
|
||||
# externally.
|
||||
DIST_DEPENDS_ON_UPDATE_PO = yes
|
||||
|
@ -1,3 +1,5 @@
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
# List of source files which contain translatable strings.
|
||||
src/xz/args.c
|
||||
src/xz/coder.c
|
||||
@ -6,8 +8,10 @@ src/xz/hardware.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
|
||||
src/xz/util.c
|
||||
src/lzmainfo/lzmainfo.c
|
||||
src/common/tuklib_exit.c
|
||||
|
126
po/ca.po
126
po/ca.po
@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz 5.4.0-pre2\n"
|
||||
"Report-Msgid-Bugs-To: xz@tukaani.org\n"
|
||||
"POT-Creation-Date: 2023-01-11 19:01+0200\n"
|
||||
"POT-Creation-Date: 2022-12-01 21:23+0200\n"
|
||||
"PO-Revision-Date: 2022-12-12 18:19+0300\n"
|
||||
"Last-Translator: Jordi Mas i Hernàndez <jmas@softcatala.org>\n"
|
||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||
@ -17,48 +17,48 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=2; plural=(n==1) ? 0 : 1;\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
|
||||
#: src/xz/args.c:77
|
||||
#: src/xz/args.c:64
|
||||
#, c-format
|
||||
msgid "%s: Invalid argument to --block-list"
|
||||
msgstr "%s: argument no vàlid per a --block-list"
|
||||
|
||||
#: src/xz/args.c:87
|
||||
#: src/xz/args.c:74
|
||||
#, c-format
|
||||
msgid "%s: Too many arguments to --block-list"
|
||||
msgstr "%s: massa arguments per a --block-list"
|
||||
|
||||
#: src/xz/args.c:116
|
||||
#: src/xz/args.c:103
|
||||
msgid "0 can only be used as the last element in --block-list"
|
||||
msgstr "0 només es pot utilitzar com a últim element a --block-list"
|
||||
|
||||
#: src/xz/args.c:451
|
||||
#: src/xz/args.c:436
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s: tipus de format de fitxer desconegut"
|
||||
|
||||
#: src/xz/args.c:474 src/xz/args.c:482
|
||||
#: src/xz/args.c:459 src/xz/args.c:467
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s: tipus de comprovació d'integritat no suportat"
|
||||
|
||||
#: src/xz/args.c:518
|
||||
#: src/xz/args.c:503
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr "Només es pot especificar un fitxer amb `--files' o `--files0'."
|
||||
|
||||
#: src/xz/args.c:586
|
||||
#: src/xz/args.c:571
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "La variable d'entorn %s conté massa arguments"
|
||||
|
||||
#: src/xz/args.c:688
|
||||
#: src/xz/args.c:673
|
||||
msgid "Compression support was disabled at build time"
|
||||
msgstr "El suport de compressió s'ha desactivat en temps de construcció"
|
||||
|
||||
#: src/xz/args.c:695
|
||||
#: src/xz/args.c:680
|
||||
msgid "Decompression support was disabled at build time"
|
||||
msgstr "El suport de descompressió s'ha desactivat en temps de construcció"
|
||||
|
||||
#: src/xz/args.c:701
|
||||
#: src/xz/args.c:686
|
||||
msgid "Compression of lzip files (.lz) is not supported"
|
||||
msgstr "No s'admet la compressió de fitxers lzip (.lz)"
|
||||
|
||||
@ -545,63 +545,63 @@ msgstr "No es poden llegir les dades de l'entrada estàndard en llegir els noms
|
||||
msgid "%s: "
|
||||
msgstr "%s: "
|
||||
|
||||
#: src/xz/message.c:797 src/xz/message.c:856
|
||||
#: src/xz/message.c:788 src/xz/message.c:847
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Error intern (error)"
|
||||
|
||||
#: src/xz/message.c:804
|
||||
#: src/xz/message.c:795
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "No es poden establir els gestors de senyals"
|
||||
|
||||
#: src/xz/message.c:813
|
||||
#: src/xz/message.c:804
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "Sense comprovació d'integritat; no es verifica la integritat del fitxer"
|
||||
|
||||
#: src/xz/message.c:816
|
||||
#: src/xz/message.c:807
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr "Tipus no admès de comprovació d'integritat; no es verifica la integritat del fitxer"
|
||||
|
||||
#: src/xz/message.c:823
|
||||
#: src/xz/message.c:814
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "S'ha arribat al límit d'ús de la memòria"
|
||||
|
||||
#: src/xz/message.c:826
|
||||
#: src/xz/message.c:817
|
||||
msgid "File format not recognized"
|
||||
msgstr "No s'ha reconegut el format del fitxer"
|
||||
|
||||
#: src/xz/message.c:829
|
||||
#: src/xz/message.c:820
|
||||
msgid "Unsupported options"
|
||||
msgstr "Opcions no suportades"
|
||||
|
||||
#: src/xz/message.c:832
|
||||
#: src/xz/message.c:823
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Les dades comprimides estan malmeses"
|
||||
|
||||
#: src/xz/message.c:835
|
||||
#: src/xz/message.c:826
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Final inesperat de l'entrada"
|
||||
|
||||
#: src/xz/message.c:877
|
||||
#: src/xz/message.c:868
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limiter is disabled."
|
||||
msgstr "Es requereixen %s MiB de memòria. El limitador està desactivat."
|
||||
|
||||
#: src/xz/message.c:905
|
||||
#: src/xz/message.c:896
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "Es requereixen %s MiB de memòria. El límit és %s."
|
||||
|
||||
#: src/xz/message.c:924
|
||||
#: src/xz/message.c:915
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: Cadena de filtratge: %s\n"
|
||||
|
||||
#: src/xz/message.c:935
|
||||
#: src/xz/message.c:926
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Proveu «%s --help» per a més informació."
|
||||
|
||||
#: src/xz/message.c:961
|
||||
#: src/xz/message.c:952
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
@ -612,17 +612,17 @@ msgstr ""
|
||||
"Comprimeix o descomprimeix FITXERS en format .xz.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:968
|
||||
#: src/xz/message.c:959
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Els arguments obligatoris per a opcions llargues també són obligatoris\n"
|
||||
"per a opcions curtes.\n"
|
||||
|
||||
#: src/xz/message.c:972
|
||||
#: src/xz/message.c:963
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " Mode d'operació:\n"
|
||||
|
||||
#: src/xz/message.c:975
|
||||
#: src/xz/message.c:966
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
@ -634,7 +634,7 @@ msgstr ""
|
||||
" -t, --test comprova la integritat del fitxer comprimit\n"
|
||||
" -l, --list informació sobre els fitxers .xz"
|
||||
|
||||
#: src/xz/message.c:981
|
||||
#: src/xz/message.c:972
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
@ -642,7 +642,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Modificadors de l'operació:\n"
|
||||
|
||||
#: src/xz/message.c:984
|
||||
#: src/xz/message.c:975
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
@ -654,7 +654,7 @@ msgstr ""
|
||||
" -c, --stdout escriu a la sortida estàndard i no suprimeixis els\n"
|
||||
" fitxers d'entrada"
|
||||
|
||||
#: src/xz/message.c:993
|
||||
#: src/xz/message.c:984
|
||||
msgid ""
|
||||
" --single-stream decompress only the first stream, and silently\n"
|
||||
" ignore possible remaining input data"
|
||||
@ -662,7 +662,7 @@ msgstr ""
|
||||
" --single-stream descomprimeix només el primer flux, i silenciosament\n"
|
||||
" ignora les possibles dades d'entrada restants"
|
||||
|
||||
#: src/xz/message.c:996
|
||||
#: src/xz/message.c:987
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
@ -679,7 +679,7 @@ msgstr ""
|
||||
" caràcter de línia nova\n"
|
||||
" --files0[=FILE] com --files però usa el caràcter nul com a terminador"
|
||||
|
||||
#: src/xz/message.c:1005
|
||||
#: src/xz/message.c:996
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
@ -687,7 +687,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Opcions bàsiques de format i compressió de fitxers:\n"
|
||||
|
||||
#: src/xz/message.c:1007
|
||||
#: src/xz/message.c:998
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
|
||||
@ -700,11 +700,11 @@ msgstr ""
|
||||
" -C, --check=CHECK el tipus de comprovació d'integritat: «none» (useu amb\n"
|
||||
" precaució), «crc32», «crc64» (predeterminat), o «sha256»"
|
||||
|
||||
#: src/xz/message.c:1012
|
||||
#: src/xz/message.c:1003
|
||||
msgid " --ignore-check don't verify the integrity check when decompressing"
|
||||
msgstr " --ignore-check no verifiquis la comprovació d'integritat en descomprimir"
|
||||
|
||||
#: src/xz/message.c:1016
|
||||
#: src/xz/message.c:1007
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
@ -713,7 +713,7 @@ msgstr ""
|
||||
" compte l'ús de memòria del compressor *i* del\n"
|
||||
" descompressor abans d'utilitzar 7-9!"
|
||||
|
||||
#: src/xz/message.c:1020
|
||||
#: src/xz/message.c:1011
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
@ -722,7 +722,7 @@ msgstr ""
|
||||
" de CPU no afecta els requisits de memòria del\n"
|
||||
" descompressor"
|
||||
|
||||
#: src/xz/message.c:1024
|
||||
#: src/xz/message.c:1015
|
||||
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"
|
||||
@ -731,7 +731,7 @@ msgstr ""
|
||||
" estableix a 0 per a utilitzar tants fils com nuclis té\n"
|
||||
" el processador"
|
||||
|
||||
#: src/xz/message.c:1029
|
||||
#: src/xz/message.c:1020
|
||||
msgid ""
|
||||
" --block-size=SIZE\n"
|
||||
" start a new .xz block after every SIZE bytes of input;\n"
|
||||
@ -742,7 +742,7 @@ msgstr ""
|
||||
" d'entrada; utilitzeu-ho per a establir la mida del bloc\n"
|
||||
" per a la compressió amb fils"
|
||||
|
||||
#: src/xz/message.c:1033
|
||||
#: src/xz/message.c:1024
|
||||
msgid ""
|
||||
" --block-list=SIZES\n"
|
||||
" start a new .xz block after the given comma-separated\n"
|
||||
@ -752,7 +752,7 @@ msgstr ""
|
||||
" inicia un bloc nou .xz després dels intervals de dades\n"
|
||||
" sense comprimir donats amb separació per comes"
|
||||
|
||||
#: src/xz/message.c:1037
|
||||
#: src/xz/message.c:1028
|
||||
msgid ""
|
||||
" --flush-timeout=TIMEOUT\n"
|
||||
" when compressing, if more than TIMEOUT milliseconds has\n"
|
||||
@ -764,7 +764,7 @@ msgstr ""
|
||||
" d'espera des de l'anterior fluix i llegir més entrades\n"
|
||||
" blocaria, totes les dades pendents es buiden"
|
||||
|
||||
#: src/xz/message.c:1043
|
||||
#: src/xz/message.c:1034
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
@ -783,7 +783,7 @@ msgstr ""
|
||||
" descompressió, descompressió amb fils, o tots ells; el\n"
|
||||
" LÍMIT és en bytes, % de RAM, o 0 per als predeterminats"
|
||||
|
||||
#: src/xz/message.c:1052
|
||||
#: src/xz/message.c:1043
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
@ -791,7 +791,7 @@ msgstr ""
|
||||
" --no-adjust si la configuració de compressió excedeix el límit d'ús\n"
|
||||
" de memòria, dona error en lloc de reduir la configuració"
|
||||
|
||||
#: src/xz/message.c:1058
|
||||
#: src/xz/message.c:1049
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
@ -800,7 +800,7 @@ msgstr ""
|
||||
" Cadena de filtre personalitzada per a la compressió (alternativa per a l'ús\n"
|
||||
" de predefinits):"
|
||||
|
||||
#: src/xz/message.c:1067
|
||||
#: src/xz/message.c:1058
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
@ -832,7 +832,7 @@ msgstr ""
|
||||
" depth=NUM profunditat màxima de cerca; 0=automàtic\n"
|
||||
" (predeterminat)"
|
||||
|
||||
#: src/xz/message.c:1082
|
||||
#: src/xz/message.c:1073
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@ -857,7 +857,7 @@ msgstr ""
|
||||
" start=Núm. decalatge d'inici per a les conversions\n"
|
||||
" (per defecte=0)"
|
||||
|
||||
#: src/xz/message.c:1095
|
||||
#: src/xz/message.c:1086
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
@ -869,7 +869,7 @@ msgstr ""
|
||||
" dist=Núm. entre bytes que es resten de\n"
|
||||
" l'altre (1-256; 1)"
|
||||
|
||||
#: src/xz/message.c:1103
|
||||
#: src/xz/message.c:1094
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
@ -877,7 +877,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Altres opcions:\n"
|
||||
|
||||
#: src/xz/message.c:1106
|
||||
#: src/xz/message.c:1097
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
@ -887,17 +887,17 @@ msgstr ""
|
||||
" -v, --verbose sigues detallat; especifiqueu dues vegades per a tenir\n"
|
||||
" encara més detall"
|
||||
|
||||
#: src/xz/message.c:1111
|
||||
#: src/xz/message.c:1102
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn fes que els avisos no afectin l'estat de sortida"
|
||||
|
||||
#: src/xz/message.c:1113
|
||||
#: src/xz/message.c:1104
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr ""
|
||||
" --robot usa missatges analitzables per la màquina\n"
|
||||
" (útil per a scripts)"
|
||||
|
||||
#: src/xz/message.c:1116
|
||||
#: src/xz/message.c:1107
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
@ -905,7 +905,7 @@ msgstr ""
|
||||
" --info-memory mostra la quantitat total de RAM i els límits actualment\n"
|
||||
" actius d'ús de memòria, i surt"
|
||||
|
||||
#: src/xz/message.c:1119
|
||||
#: src/xz/message.c:1110
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
@ -913,7 +913,7 @@ msgstr ""
|
||||
" -h, --help mostra l'ajuda curta (només mostra les opcions bàsiques)\n"
|
||||
" -H, --long-help mostra aquesta ajuda llarga i surt"
|
||||
|
||||
#: src/xz/message.c:1123
|
||||
#: src/xz/message.c:1114
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
@ -921,11 +921,11 @@ msgstr ""
|
||||
" -h, --help mostra aquesta ajuda curta i surt\n"
|
||||
" -H, --long-help mostra l'ajuda llarga (llista també opcions avançades)"
|
||||
|
||||
#: src/xz/message.c:1128
|
||||
#: src/xz/message.c:1119
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version mostra el número de versió i surt"
|
||||
|
||||
#: src/xz/message.c:1130
|
||||
#: src/xz/message.c:1121
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
@ -937,17 +937,17 @@ 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:1136
|
||||
#: src/xz/message.c:1127
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr "Informa d'errors a <%s> (en anglès o finès).\n"
|
||||
|
||||
#: src/xz/message.c:1138
|
||||
#: src/xz/message.c:1129
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "Pàgina inicial de %s: <%s>\n"
|
||||
|
||||
#: src/xz/message.c:1142
|
||||
#: src/xz/message.c:1133
|
||||
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
|
||||
msgstr "AQUESTA ÉS UNA VERSIÓ DE DESENVOLUPAMENT NO DESTINADA A L'ÚS EN PRODUCCIÓ."
|
||||
|
||||
@ -975,22 +975,22 @@ msgstr "No s'admet el LZMA1/LZMA2 predefinit: %s"
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr "La suma de lc i lp no ha de superar 4"
|
||||
|
||||
#: src/xz/suffix.c:137 src/xz/suffix.c:268
|
||||
#: src/xz/suffix.c:134 src/xz/suffix.c:265
|
||||
#, c-format
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s: amb --format=raw, --suffix=.SUF és necessari si no s'escriu a la sortida estàndard"
|
||||
|
||||
#: src/xz/suffix.c:168
|
||||
#: src/xz/suffix.c:165
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s: El nom de fitxer té un sufix desconegut, s'omet"
|
||||
|
||||
#: src/xz/suffix.c:189
|
||||
#: src/xz/suffix.c:186
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s: El fitxer ja té el sufix «%s», s'ometrà"
|
||||
|
||||
#: src/xz/suffix.c:405
|
||||
#: src/xz/suffix.c:402
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: El sufix del nom de fitxer no és vàlid"
|
||||
|
257
po/fi.po
257
po/fi.po
@ -6,8 +6,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz 5.4.0-pre1\n"
|
||||
"Report-Msgid-Bugs-To: xz@tukaani.org\n"
|
||||
"POT-Creation-Date: 2023-01-11 19:01+0200\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2022-11-09 19:59+0200\n"
|
||||
"PO-Revision-Date: 2022-11-10 16:17+0200\n"
|
||||
"Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n"
|
||||
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
|
||||
@ -19,48 +19,48 @@ msgstr ""
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"X-Generator: Poedit 3.2\n"
|
||||
|
||||
#: src/xz/args.c:77
|
||||
#: src/xz/args.c:64
|
||||
#, c-format
|
||||
msgid "%s: Invalid argument to --block-list"
|
||||
msgstr "%s: Virheellinen argumentti valitsimelle --block-list"
|
||||
|
||||
#: src/xz/args.c:87
|
||||
#: src/xz/args.c:74
|
||||
#, c-format
|
||||
msgid "%s: Too many arguments to --block-list"
|
||||
msgstr "%s: Liian monta argumenttia valitsimelle --block-list"
|
||||
|
||||
#: src/xz/args.c:116
|
||||
#: src/xz/args.c:103
|
||||
msgid "0 can only be used as the last element in --block-list"
|
||||
msgstr "0:aa voi käyttää vain viimeisenä alkiona valitsimen --block-list kanssa"
|
||||
|
||||
#: src/xz/args.c:451
|
||||
#: src/xz/args.c:424
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s: Tuntematon tiedostomuototyyppi"
|
||||
|
||||
#: src/xz/args.c:474 src/xz/args.c:482
|
||||
#: src/xz/args.c:447 src/xz/args.c:455
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s: Eheystarkistuksen tyyppiä ei tueta"
|
||||
|
||||
#: src/xz/args.c:518
|
||||
#: src/xz/args.c:491
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr "Vain yksi tiedosto voidaan antaa valitsimille ”--files” ja ”--files0”."
|
||||
|
||||
#: src/xz/args.c:586
|
||||
#: src/xz/args.c:559
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "Ympäristömuuttuja %s sisältää liian monta argumenttia"
|
||||
|
||||
#: src/xz/args.c:688
|
||||
#: src/xz/args.c:661
|
||||
msgid "Compression support was disabled at build time"
|
||||
msgstr "Tiivistämistuki on poistettu käytöstä käännösaikana"
|
||||
|
||||
#: src/xz/args.c:695
|
||||
#: src/xz/args.c:668
|
||||
msgid "Decompression support was disabled at build time"
|
||||
msgstr "Purkutuki on poistettu käytöstä käännösaikana"
|
||||
|
||||
#: src/xz/args.c:701
|
||||
#: src/xz/args.c:674
|
||||
msgid "Compression of lzip files (.lz) is not supported"
|
||||
msgstr "Lzip-tiedostojen (.lz) pakkaamista ei tueta"
|
||||
|
||||
@ -263,143 +263,143 @@ msgstr "%s: Odottamaton tiedoston loppu"
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s: Kirjoitusvirhe: %s"
|
||||
|
||||
#: src/xz/hardware.c:238
|
||||
#: src/xz/hardware.c:225
|
||||
msgid "Disabled"
|
||||
msgstr "Pois käytöstä"
|
||||
|
||||
#: src/xz/hardware.c:269
|
||||
#: src/xz/hardware.c:256
|
||||
msgid "Amount of physical memory (RAM):"
|
||||
msgstr "Fyysisen muistin kokonaismäärä (RAM):"
|
||||
|
||||
#: src/xz/hardware.c:270
|
||||
#: src/xz/hardware.c:257
|
||||
msgid "Number of processor threads:"
|
||||
msgstr "Suoritinsäikeiden määrä:"
|
||||
|
||||
#: src/xz/hardware.c:271
|
||||
#: src/xz/hardware.c:258
|
||||
msgid "Compression:"
|
||||
msgstr "Tiivistys:"
|
||||
|
||||
#: src/xz/hardware.c:272
|
||||
#: src/xz/hardware.c:259
|
||||
msgid "Decompression:"
|
||||
msgstr "Purku:"
|
||||
|
||||
#: src/xz/hardware.c:273
|
||||
#: src/xz/hardware.c:260
|
||||
msgid "Multi-threaded decompression:"
|
||||
msgstr "Monisäikeinen purku:"
|
||||
|
||||
#: src/xz/hardware.c:274
|
||||
#: src/xz/hardware.c:261
|
||||
msgid "Default for -T0:"
|
||||
msgstr "-T0:n oletusarvo:"
|
||||
|
||||
#: src/xz/hardware.c:292
|
||||
#: src/xz/hardware.c:279
|
||||
msgid "Hardware information:"
|
||||
msgstr "Laitteiston tiedot:"
|
||||
|
||||
#: src/xz/hardware.c:299
|
||||
#: src/xz/hardware.c:286
|
||||
msgid "Memory usage limits:"
|
||||
msgstr "Muistinkäytön rajat:"
|
||||
|
||||
#: src/xz/list.c:68
|
||||
#: src/xz/list.c:65
|
||||
msgid "Streams:"
|
||||
msgstr "Virrat:"
|
||||
|
||||
#: src/xz/list.c:69
|
||||
#: src/xz/list.c:66
|
||||
msgid "Blocks:"
|
||||
msgstr "Lohkot:"
|
||||
|
||||
#: src/xz/list.c:70
|
||||
#: src/xz/list.c:67
|
||||
msgid "Compressed size:"
|
||||
msgstr "Tiivistetty koko:"
|
||||
|
||||
#: src/xz/list.c:71
|
||||
#: src/xz/list.c:68
|
||||
msgid "Uncompressed size:"
|
||||
msgstr "Tiivistämätön koko:"
|
||||
|
||||
#: src/xz/list.c:72
|
||||
#: src/xz/list.c:69
|
||||
msgid "Ratio:"
|
||||
msgstr "Suhde:"
|
||||
|
||||
#: src/xz/list.c:73
|
||||
#: src/xz/list.c:70
|
||||
msgid "Check:"
|
||||
msgstr "Tarkistus:"
|
||||
|
||||
#: src/xz/list.c:74
|
||||
#: src/xz/list.c:71
|
||||
msgid "Stream Padding:"
|
||||
msgstr "Virran tasaus:"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
#: src/xz/list.c:72
|
||||
msgid "Memory needed:"
|
||||
msgstr "Tarvittava muisti:"
|
||||
|
||||
#: src/xz/list.c:76
|
||||
#: src/xz/list.c:73
|
||||
msgid "Sizes in headers:"
|
||||
msgstr "Koot otsakkeissa:"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
#: src/xz/list.c:76
|
||||
msgid "Number of files:"
|
||||
msgstr "Tiedostojen määrä:"
|
||||
|
||||
#: src/xz/list.c:122
|
||||
#: src/xz/list.c:119
|
||||
msgid "Stream"
|
||||
msgstr "Virta"
|
||||
|
||||
#: src/xz/list.c:123
|
||||
#: src/xz/list.c:120
|
||||
msgid "Block"
|
||||
msgstr "Lohko"
|
||||
|
||||
#: src/xz/list.c:124
|
||||
#: src/xz/list.c:121
|
||||
msgid "Blocks"
|
||||
msgstr "Lohkot"
|
||||
|
||||
#: src/xz/list.c:125
|
||||
#: src/xz/list.c:122
|
||||
msgid "CompOffset"
|
||||
msgstr "TiivSiirr."
|
||||
|
||||
#: src/xz/list.c:126
|
||||
#: src/xz/list.c:123
|
||||
msgid "UncompOffset"
|
||||
msgstr "Tv:tönSiirr."
|
||||
|
||||
#: src/xz/list.c:127
|
||||
#: src/xz/list.c:124
|
||||
msgid "CompSize"
|
||||
msgstr "TiivKoko"
|
||||
|
||||
#: src/xz/list.c:128
|
||||
#: src/xz/list.c:125
|
||||
msgid "UncompSize"
|
||||
msgstr "Tv:tönKoko"
|
||||
|
||||
#: src/xz/list.c:129
|
||||
#: src/xz/list.c:126
|
||||
msgid "TotalSize"
|
||||
msgstr "Yht.Koko"
|
||||
|
||||
#: src/xz/list.c:130
|
||||
#: src/xz/list.c:127
|
||||
msgid "Ratio"
|
||||
msgstr "Suhde"
|
||||
|
||||
#: src/xz/list.c:131
|
||||
#: src/xz/list.c:128
|
||||
msgid "Check"
|
||||
msgstr "Tark."
|
||||
|
||||
#: src/xz/list.c:132
|
||||
#: src/xz/list.c:129
|
||||
msgid "CheckVal"
|
||||
msgstr "Tark.arvo"
|
||||
|
||||
#: src/xz/list.c:133
|
||||
#: src/xz/list.c:130
|
||||
msgid "Padding"
|
||||
msgstr "Tasaus"
|
||||
|
||||
#: src/xz/list.c:134
|
||||
#: src/xz/list.c:131
|
||||
msgid "Header"
|
||||
msgstr "Otsake"
|
||||
|
||||
#: src/xz/list.c:135
|
||||
#: src/xz/list.c:132
|
||||
msgid "Flags"
|
||||
msgstr "Liput"
|
||||
|
||||
#: src/xz/list.c:136
|
||||
#: src/xz/list.c:133
|
||||
msgid "MemUsage"
|
||||
msgstr "Muist.käyt."
|
||||
|
||||
#: src/xz/list.c:137
|
||||
#: src/xz/list.c:134
|
||||
msgid "Filters"
|
||||
msgstr "Suodattimet"
|
||||
|
||||
@ -407,7 +407,7 @@ msgstr "Suodattimet"
|
||||
#. This string is used in tables. In older xz version this
|
||||
#. string was limited to ten columns in a fixed-width font, but
|
||||
#. nowadays there is no strict length restriction anymore.
|
||||
#: src/xz/list.c:169
|
||||
#: src/xz/list.c:166
|
||||
msgid "None"
|
||||
msgstr "Ei mitään"
|
||||
|
||||
@ -415,60 +415,60 @@ msgstr "Ei mitään"
|
||||
#. but the Check ID is known (here 2). In older xz version these
|
||||
#. strings were limited to ten columns in a fixed-width font, but
|
||||
#. nowadays there is no strict length restriction anymore.
|
||||
#: src/xz/list.c:175
|
||||
#: src/xz/list.c:172
|
||||
msgid "Unknown-2"
|
||||
msgstr "Tuntematon-2"
|
||||
|
||||
#: src/xz/list.c:176
|
||||
#: src/xz/list.c:173
|
||||
msgid "Unknown-3"
|
||||
msgstr "Tuntematon-3"
|
||||
|
||||
#: src/xz/list.c:178
|
||||
#: src/xz/list.c:175
|
||||
msgid "Unknown-5"
|
||||
msgstr "Tuntematon-5"
|
||||
|
||||
#: src/xz/list.c:179
|
||||
#: src/xz/list.c:176
|
||||
msgid "Unknown-6"
|
||||
msgstr "Tuntematon-6"
|
||||
|
||||
#: src/xz/list.c:180
|
||||
#: src/xz/list.c:177
|
||||
msgid "Unknown-7"
|
||||
msgstr "Tuntematon-7"
|
||||
|
||||
#: src/xz/list.c:181
|
||||
#: src/xz/list.c:178
|
||||
msgid "Unknown-8"
|
||||
msgstr "Tuntematon-8"
|
||||
|
||||
#: src/xz/list.c:182
|
||||
#: src/xz/list.c:179
|
||||
msgid "Unknown-9"
|
||||
msgstr "Tuntematon-9"
|
||||
|
||||
#: src/xz/list.c:184
|
||||
#: src/xz/list.c:181
|
||||
msgid "Unknown-11"
|
||||
msgstr "Tuntematon-11"
|
||||
|
||||
#: src/xz/list.c:185
|
||||
#: src/xz/list.c:182
|
||||
msgid "Unknown-12"
|
||||
msgstr "Tuntematon-12"
|
||||
|
||||
#: src/xz/list.c:186
|
||||
#: src/xz/list.c:183
|
||||
msgid "Unknown-13"
|
||||
msgstr "Tuntematon-13"
|
||||
|
||||
#: src/xz/list.c:187
|
||||
#: src/xz/list.c:184
|
||||
msgid "Unknown-14"
|
||||
msgstr "Tuntematon-14"
|
||||
|
||||
#: src/xz/list.c:188
|
||||
#: src/xz/list.c:185
|
||||
msgid "Unknown-15"
|
||||
msgstr "Tuntematon-15"
|
||||
|
||||
#: src/xz/list.c:351
|
||||
#: src/xz/list.c:348
|
||||
#, c-format
|
||||
msgid "%s: File is empty"
|
||||
msgstr "%s: Tiedosto on tyhjä"
|
||||
|
||||
#: src/xz/list.c:356
|
||||
#: src/xz/list.c:353
|
||||
#, c-format
|
||||
msgid "%s: Too small to be a valid .xz file"
|
||||
msgstr "%s: Liian pieni kelvolliseksi .xz-tiedostoksi"
|
||||
@ -477,41 +477,41 @@ msgstr "%s: Liian pieni kelvolliseksi .xz-tiedostoksi"
|
||||
#. 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:730
|
||||
#: src/xz/list.c:722
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr "Virrat Lohkot Tiivist. Tiivistämätön Suhde Tark. Tiedostonimi"
|
||||
|
||||
#: src/xz/list.c:1025 src/xz/list.c:1203
|
||||
#: src/xz/list.c:1016 src/xz/list.c:1193
|
||||
msgid "Yes"
|
||||
msgstr "Kyllä"
|
||||
|
||||
#: src/xz/list.c:1025 src/xz/list.c:1203
|
||||
#: src/xz/list.c:1016 src/xz/list.c:1193
|
||||
msgid "No"
|
||||
msgstr "Ei"
|
||||
|
||||
#: src/xz/list.c:1027 src/xz/list.c:1205
|
||||
#: src/xz/list.c:1018 src/xz/list.c:1195
|
||||
#, c-format
|
||||
msgid " Minimum XZ Utils version: %s\n"
|
||||
msgstr " XZ Utilsin vähimmäisversio: %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:1178
|
||||
#: src/xz/list.c:1168
|
||||
#, c-format
|
||||
msgid "%s file\n"
|
||||
msgid_plural "%s files\n"
|
||||
msgstr[0] "%s tiedosto\n"
|
||||
msgstr[1] "%s tiedostoa\n"
|
||||
|
||||
#: src/xz/list.c:1191
|
||||
#: src/xz/list.c:1181
|
||||
msgid "Totals:"
|
||||
msgstr "Yhteensä:"
|
||||
|
||||
#: src/xz/list.c:1269
|
||||
#: src/xz/list.c:1259
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr "--list toimii vain .xz-tiedostoille (--format=xz tai --format=auto)"
|
||||
|
||||
#: src/xz/list.c:1275
|
||||
#: src/xz/list.c:1265
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr "--list ei tue lukemista vakiosyötteestä"
|
||||
|
||||
@ -547,63 +547,63 @@ msgstr "Dataa ei voi lukea vakiosyötteestä kun tiedostonimiä luetaan vakiosy
|
||||
msgid "%s: "
|
||||
msgstr "%s: "
|
||||
|
||||
#: src/xz/message.c:797 src/xz/message.c:856
|
||||
#: src/xz/message.c:788 src/xz/message.c:847
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Sisäinen virhe (ohjelmistovika)"
|
||||
|
||||
#: src/xz/message.c:804
|
||||
#: src/xz/message.c:795
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Signaalinkäsittelimiä ei voi muodostaa"
|
||||
|
||||
#: src/xz/message.c:813
|
||||
#: src/xz/message.c:804
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "Ei eheystarkastusta; ei varmenneta tiedoston eheyttä"
|
||||
|
||||
#: src/xz/message.c:816
|
||||
#: src/xz/message.c:807
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr "Ei-tuettu eheystarkastuksen tyyppi; ei varmenneta tiedoston eheyttä"
|
||||
|
||||
#: src/xz/message.c:823
|
||||
#: src/xz/message.c:814
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Muistinkäytön raja saavutettu"
|
||||
|
||||
#: src/xz/message.c:826
|
||||
#: src/xz/message.c:817
|
||||
msgid "File format not recognized"
|
||||
msgstr "Tiedostomuotoa ei tunnistettu"
|
||||
|
||||
#: src/xz/message.c:829
|
||||
#: src/xz/message.c:820
|
||||
msgid "Unsupported options"
|
||||
msgstr "Ei-tuetut valitsimet"
|
||||
|
||||
#: src/xz/message.c:832
|
||||
#: src/xz/message.c:823
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Tiivistetty data on turmeltunut"
|
||||
|
||||
#: src/xz/message.c:835
|
||||
#: src/xz/message.c:826
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Odottamaton syötteen loppu"
|
||||
|
||||
#: src/xz/message.c:877
|
||||
#: src/xz/message.c:868
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limiter is disabled."
|
||||
msgstr "%s MiB muistia vaaditaan. Rajoitin on poistettu käytöstä."
|
||||
|
||||
#: src/xz/message.c:905
|
||||
#: src/xz/message.c:896
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "%s MiB muistia vaaditaan. Raja on %s."
|
||||
|
||||
#: src/xz/message.c:924
|
||||
#: src/xz/message.c:1070
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: Suodinketju: %s\n"
|
||||
|
||||
#: src/xz/message.c:935
|
||||
#: src/xz/message.c:1080
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Komento ”%s --help” antaa lisää tietoa."
|
||||
|
||||
#: src/xz/message.c:961
|
||||
#: src/xz/message.c:1106
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
@ -614,15 +614,15 @@ msgstr ""
|
||||
"Tiivistä tai pura .xz-muotoisia TIEDOSTOja.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:968
|
||||
#: src/xz/message.c:1113
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr "Pitkien valitsinten pakolliset argumentit ovat pakollisia myös lyhyille.\n"
|
||||
|
||||
#: src/xz/message.c:972
|
||||
#: src/xz/message.c:1117
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " Toimintatila:\n"
|
||||
|
||||
#: src/xz/message.c:975
|
||||
#: src/xz/message.c:1120
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
@ -634,7 +634,7 @@ msgstr ""
|
||||
" -t, --test testaa tiivistetyn tiedoston eheys\n"
|
||||
" -l, --list näytä tietoja .xz-tiedostoista"
|
||||
|
||||
#: src/xz/message.c:981
|
||||
#: src/xz/message.c:1126
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
@ -642,7 +642,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Toimintomääreet:\n"
|
||||
|
||||
#: src/xz/message.c:984
|
||||
#: src/xz/message.c:1129
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
@ -653,7 +653,7 @@ msgstr ""
|
||||
" linkit\n"
|
||||
" -c, --stdout kirjoita vakiotulosteeseen äläkä poista syötetiedostoja"
|
||||
|
||||
#: src/xz/message.c:993
|
||||
#: src/xz/message.c:1138
|
||||
msgid ""
|
||||
" --single-stream decompress only the first stream, and silently\n"
|
||||
" ignore possible remaining input data"
|
||||
@ -661,7 +661,7 @@ msgstr ""
|
||||
" --single-stream pura vain ensimmäinen virta, ja ohita\n"
|
||||
" hiljaisesti mahdollinen jäljellä oleva syötedata"
|
||||
|
||||
#: src/xz/message.c:996
|
||||
#: src/xz/message.c:1141
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
@ -677,7 +677,7 @@ msgstr ""
|
||||
" tiedostonimet on päätettävä rivinvaihtomerkillä\n"
|
||||
" --files0[=TIED] kuten --files mutta käytä päättämiseen nul-merkkiä"
|
||||
|
||||
#: src/xz/message.c:1005
|
||||
#: src/xz/message.c:1150
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
@ -685,7 +685,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Tiedostomuodon ja tiivistyksen perusvalitsimet:\n"
|
||||
|
||||
#: src/xz/message.c:1007
|
||||
#: src/xz/message.c:1152
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
|
||||
@ -697,11 +697,11 @@ msgstr ""
|
||||
" -C, --check=CHECK eheystarkastuksen tyyppi: ”none” (käytä varoen),\n"
|
||||
" ”crc32”, ”crc64” (oletus) tai ”sha256”"
|
||||
|
||||
#: src/xz/message.c:1012
|
||||
#: src/xz/message.c:1157
|
||||
msgid " --ignore-check don't verify the integrity check when decompressing"
|
||||
msgstr " --ignore-check älä suorita eheystarkastusta purettaessa"
|
||||
|
||||
#: src/xz/message.c:1016
|
||||
#: src/xz/message.c:1161
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
@ -710,7 +710,7 @@ msgstr ""
|
||||
" *ja* purun muistinkäyttö huomioon ennen kuin käytät\n"
|
||||
" arvoja 7–9!"
|
||||
|
||||
#: src/xz/message.c:1020
|
||||
#: src/xz/message.c:1165
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
@ -718,7 +718,7 @@ msgstr ""
|
||||
" -e, --extreme yritä parantaa tiivistyssuhdetta käyttämällä enemmän\n"
|
||||
" suoritinaikaa; ei vaikuta purkimen muistivaatimuksiin"
|
||||
|
||||
#: src/xz/message.c:1024
|
||||
#: src/xz/message.c:1169
|
||||
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"
|
||||
@ -726,7 +726,7 @@ msgstr ""
|
||||
" -T, --threads=MÄÄRÄ käytä enintää MÄÄRÄä säiettä; oletus on 1; asettamalla\n"
|
||||
" 0:ksi käytetään suoritinytimien määrän verran säikeitä"
|
||||
|
||||
#: src/xz/message.c:1029
|
||||
#: src/xz/message.c:1174
|
||||
msgid ""
|
||||
" --block-size=SIZE\n"
|
||||
" start a new .xz block after every SIZE bytes of input;\n"
|
||||
@ -736,7 +736,7 @@ msgstr ""
|
||||
" aloita uusi .xz-lohko aina KOKO syötetavun jälkeen; käytä\n"
|
||||
" tätä säikeistetyn tiivistyksen lohkokoon asettamiseen"
|
||||
|
||||
#: src/xz/message.c:1033
|
||||
#: src/xz/message.c:1178
|
||||
msgid ""
|
||||
" --block-list=SIZES\n"
|
||||
" start a new .xz block after the given comma-separated\n"
|
||||
@ -747,7 +747,7 @@ msgstr ""
|
||||
" käsitelty pilkuilla erotellut tavumäärät"
|
||||
|
||||
# FIXME: tarvitaan kiva suomenkielinen termi block-verbille tässä merkityksessä
|
||||
#: src/xz/message.c:1037
|
||||
#: src/xz/message.c:1182
|
||||
msgid ""
|
||||
" --flush-timeout=TIMEOUT\n"
|
||||
" when compressing, if more than TIMEOUT milliseconds has\n"
|
||||
@ -759,7 +759,7 @@ msgstr ""
|
||||
" edellisestä huuhtomisesta ja syötteen lukemisen\n"
|
||||
" jatkaminen pysähtyisi, kaikki odottava data huuhdellaan"
|
||||
|
||||
#: src/xz/message.c:1043
|
||||
#: src/xz/message.c:1188
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
@ -777,7 +777,7 @@ msgstr ""
|
||||
" säikeistetylle purkamisella tai näille kaikille; RAJA\n"
|
||||
" on tavuja, %-osuus RAMista tai 0 oletusarvoille"
|
||||
|
||||
#: src/xz/message.c:1052
|
||||
#: src/xz/message.c:1197
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
@ -785,7 +785,7 @@ msgstr ""
|
||||
" --no-adjust jos tiivistysasetukset ylittävät muistinkäytön rajan,\n"
|
||||
" anna virhe äläkä pudota asetuksia alaspäin"
|
||||
|
||||
#: src/xz/message.c:1058
|
||||
#: src/xz/message.c:1203
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
@ -793,7 +793,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Mukautettu suodinketju tiivistykselle (vaihtoehto esiasetuksille):"
|
||||
|
||||
#: src/xz/message.c:1067
|
||||
#: src/xz/message.c:1212
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
@ -823,7 +823,7 @@ msgstr ""
|
||||
" bt4; bt4)\n"
|
||||
" depth=LUKU enimmäishakusyvyys; 0=automaattinen (oletus)"
|
||||
|
||||
#: src/xz/message.c:1082
|
||||
#: src/xz/message.c:1227
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@ -847,7 +847,7 @@ msgstr ""
|
||||
" Kelvolliset ASETukset kaikille BCJ-suotimille:\n"
|
||||
" start=LUKU muunnoksien aloitussiirtymä (oletus=0)"
|
||||
|
||||
#: src/xz/message.c:1095
|
||||
#: src/xz/message.c:1240
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
@ -859,7 +859,7 @@ msgstr ""
|
||||
" dist=LUKU toisistaan vähennettävien tavujen\n"
|
||||
" välinen etäisyys (1–256; 1)"
|
||||
|
||||
#: src/xz/message.c:1103
|
||||
#: src/xz/message.c:1248
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
@ -867,7 +867,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Muut valitsimet:\n"
|
||||
|
||||
#: src/xz/message.c:1106
|
||||
#: src/xz/message.c:1251
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
@ -875,15 +875,15 @@ msgstr ""
|
||||
" -q, --quiet vaienna varoitukset; kahdesti antamalla myös virheet\n"
|
||||
" -v, --verbose ole lavea; kahdesti antamalla vieläkin laveampi"
|
||||
|
||||
#: src/xz/message.c:1111
|
||||
#: src/xz/message.c:1256
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn älkööt varoitukset vaikuttako paluuarvoon"
|
||||
|
||||
#: src/xz/message.c:1113
|
||||
#: src/xz/message.c:1258
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr " --robot käytä koneluettavia viestejä (sopii skripteihin)"
|
||||
|
||||
#: src/xz/message.c:1116
|
||||
#: src/xz/message.c:1261
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
@ -891,7 +891,7 @@ msgstr ""
|
||||
" --info-memory näytä RAM-muistin kokonaismäärä ja parhaillaan\n"
|
||||
" vallitsevat muistinkäytön rajat, ja poistu"
|
||||
|
||||
#: src/xz/message.c:1119
|
||||
#: src/xz/message.c:1264
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
@ -899,7 +899,7 @@ msgstr ""
|
||||
" -h, --help näytä lyhyt ohje (kertoo vain perusvalitsimet)\n"
|
||||
" -H, --long-help näytä tämä pitkä ohje ja poistu"
|
||||
|
||||
#: src/xz/message.c:1123
|
||||
#: src/xz/message.c:1268
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
@ -907,11 +907,11 @@ msgstr ""
|
||||
" -h, --help näytä tämä lyhyt ohje ja poistu\n"
|
||||
" -H, --long-help näytä pitkä ohje (kertoo myös lisävalitsimet)"
|
||||
|
||||
#: src/xz/message.c:1128
|
||||
#: src/xz/message.c:1273
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version näytä versionumero ja poistu"
|
||||
|
||||
#: src/xz/message.c:1130
|
||||
#: src/xz/message.c:1275
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
@ -923,17 +923,17 @@ 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:1136
|
||||
#: src/xz/message.c:1281
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr "Ilmoita ohjelmistovioista (suomeksi) osoitteeseen <%s>.\n"
|
||||
|
||||
#: src/xz/message.c:1138
|
||||
#: src/xz/message.c:1283
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "%s -kotisivu: <%s>\n"
|
||||
|
||||
#: src/xz/message.c:1142
|
||||
#: src/xz/message.c:1287
|
||||
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
|
||||
msgstr "TÄMÄ ON KEHITYSVERSIO, JOTA EI OLE TARKOITETTU TUOTANTOKÄYTTÖÖN."
|
||||
|
||||
@ -952,31 +952,36 @@ msgstr "%s: Virheellinen asetuksen nimi"
|
||||
msgid "%s: Invalid option value"
|
||||
msgstr "%s: Virheellinen asetuksen arvo"
|
||||
|
||||
#: src/xz/options.c:247
|
||||
#: src/xz/options.c:286
|
||||
#, c-format
|
||||
msgid "Unsupported LZMA1/LZMA2 preset: %s"
|
||||
msgstr "Ei-tuettu LZMA1/LZMA2-esiasetus: %s"
|
||||
|
||||
#: src/xz/options.c:355
|
||||
#: src/xz/options.c:394
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr "lc:n ja lp:n summa ei saa olla yli 4"
|
||||
|
||||
#: src/xz/suffix.c:137 src/xz/suffix.c:268
|
||||
#: src/xz/options.c:398
|
||||
#, c-format
|
||||
msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
msgstr "Valittu täsmäävyydenetsin vaatii vähintään nice-arvon=%<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:134 src/xz/suffix.c:265
|
||||
#, c-format
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s: --format=raw vaatii, että --suffix=.PÄÄTE on annettu, ellei kirjoiteta vakiotulosteeseen"
|
||||
|
||||
#: src/xz/suffix.c:168
|
||||
#: src/xz/suffix.c:165
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s: Tiedostonimen pääte on tuntematon, ohitetaan"
|
||||
|
||||
#: src/xz/suffix.c:189
|
||||
#: src/xz/suffix.c:186
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s: Tiedostolla on jo ”%s”-pääte, ohitetaan"
|
||||
|
||||
#: src/xz/suffix.c:405
|
||||
#: src/xz/suffix.c:402
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: Virheellinen tiedostonimen pääte"
|
||||
@ -1016,10 +1021,6 @@ msgstr "Vakiotulosteeseen kirjoitus epäonnistui"
|
||||
msgid "Unknown error"
|
||||
msgstr "Tuntematon virhe"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
#~ msgstr "Valittu täsmäävyydenetsin vaatii vähintään nice-arvon=%<PRIu32>"
|
||||
|
||||
#~ msgid "Sandbox is disabled due to incompatible command line arguments"
|
||||
#~ msgstr "Hiekkalaatikko on poistettu käytöstä yhteensopimattomien komentoriviargumenttien vuoksi"
|
||||
|
||||
|
159
po/fr.po
159
po/fr.po
@ -1,14 +1,14 @@
|
||||
# XZ Utils French Translation
|
||||
# This file is put in the public domain.
|
||||
# Adrien Nader <adrien@notk.org>, 2011-2014.
|
||||
# Stéphane Aulery <lkppo@free.fr>, 2019.
|
||||
# Stéphane Aulery <lkppo@free.fr>, 2019-2023.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-5.2.4\n"
|
||||
"Project-Id-Version: xz-5.4.4-pre1\n"
|
||||
"Report-Msgid-Bugs-To: xz@tukaani.org\n"
|
||||
"POT-Creation-Date: 2023-01-11 19:01+0200\n"
|
||||
"PO-Revision-Date: 2019-05-12 05:46+0200\n"
|
||||
"POT-Creation-Date: 2023-07-18 23:34+0800\n"
|
||||
"PO-Revision-Date: 2023-12-19 04:12+0100\n"
|
||||
"Last-Translator: Stéphane Aulery <lkppo@free.fr>\n"
|
||||
"Language-Team: French <traduc@traduc.org>\n"
|
||||
"Language: fr\n"
|
||||
@ -46,23 +46,41 @@ msgstr "%s : Type de vérification d'intégrité inconnu"
|
||||
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:586
|
||||
#. TRANSLATORS: This is a translatable
|
||||
#. string because French needs a space
|
||||
#. before the colon ("%s : %s").
|
||||
#: src/xz/args.c:533 src/xz/coder.c:691 src/xz/coder.c:707 src/xz/coder.c:967
|
||||
#: src/xz/coder.c:970 src/xz/file_io.c:605 src/xz/file_io.c:679
|
||||
#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
|
||||
#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s: "
|
||||
msgid "%s: %s"
|
||||
msgstr "%s : "
|
||||
|
||||
#: src/xz/args.c:589
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "La variable d'environnement %s contient trop d'arguments"
|
||||
|
||||
#: src/xz/args.c:688
|
||||
#: src/xz/args.c:691
|
||||
msgid "Compression support was disabled at build time"
|
||||
msgstr "Le support de la compression à était désactivé lors de la compilaton"
|
||||
|
||||
#: src/xz/args.c:695
|
||||
#: src/xz/args.c:698
|
||||
msgid "Decompression support was disabled at build time"
|
||||
msgstr "Le support de la décompression a été désactivé lors de la compilation"
|
||||
|
||||
#: src/xz/args.c:701
|
||||
#: src/xz/args.c:704
|
||||
msgid "Compression of lzip files (.lz) is not supported"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/args.c:735
|
||||
#, fuzzy
|
||||
#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgid "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/coder.c:115
|
||||
msgid "Maximum number of filters is four"
|
||||
msgstr "Le nombre maximal de filtres est quatre"
|
||||
@ -111,7 +129,6 @@ msgstr "La décompression nécessitera %s MiB de mémoire."
|
||||
|
||||
#: src/xz/coder.c:309
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
msgid "Reduced 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"
|
||||
|
||||
@ -122,7 +139,6 @@ msgstr ""
|
||||
|
||||
#: src/xz/coder.c:356
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
msgid "Switching to single-threaded mode 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"
|
||||
|
||||
@ -136,11 +152,11 @@ msgstr "Taille du dictionnaire LZMA%c réduite de %s MiB à %s MiB pour ne pas d
|
||||
msgid "Error creating a pipe: %s"
|
||||
msgstr "Impossible de créer un tube anonyme (pipe) : %s"
|
||||
|
||||
#: src/xz/file_io.c:235
|
||||
#: src/xz/file_io.c:252
|
||||
msgid "Failed to enable the sandbox"
|
||||
msgstr "Echec de l'activation de la sandboxe"
|
||||
|
||||
#: src/xz/file_io.c:277
|
||||
#: src/xz/file_io.c:294
|
||||
#, c-format
|
||||
msgid "%s: poll() failed: %s"
|
||||
msgstr "%s : L'appel à la fonction poll() a échoué : %s"
|
||||
@ -155,27 +171,27 @@ 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:344
|
||||
#: src/xz/file_io.c:361
|
||||
#, 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:351 src/xz/file_io.c:907
|
||||
#: src/xz/file_io.c:368 src/xz/file_io.c:924
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr "%s : Impossible de supprimer : %s"
|
||||
|
||||
#: src/xz/file_io.c:377
|
||||
#: src/xz/file_io.c:394
|
||||
#, 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:390
|
||||
#: src/xz/file_io.c:407
|
||||
#, 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:409
|
||||
#: src/xz/file_io.c:426
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s : Impossible de modifier les permissions du fichier : %s"
|
||||
@ -188,88 +204,88 @@ msgstr "%s : Impossible de modifier les permissions du fichier : %s"
|
||||
# - 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:535
|
||||
#: src/xz/file_io.c:552
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard input: %s"
|
||||
msgstr "Echec de la lecture du drapeau d'état du fichier depuis la sortie standard : %s"
|
||||
|
||||
#: src/xz/file_io.c:593 src/xz/file_io.c:655
|
||||
#: src/xz/file_io.c:610 src/xz/file_io.c:672
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s est un lien symbolique : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:684
|
||||
#: src/xz/file_io.c:701
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s est un répertoire : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:690
|
||||
#: src/xz/file_io.c:707
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s n'est pas un fichier régulier : ignoré"
|
||||
|
||||
#: src/xz/file_io.c:707
|
||||
#: src/xz/file_io.c:724
|
||||
#, 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:714
|
||||
#: src/xz/file_io.c:731
|
||||
#, 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:721
|
||||
#: src/xz/file_io.c:738
|
||||
#, 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é"
|
||||
|
||||
#: src/xz/file_io.c:763
|
||||
#: src/xz/file_io.c:780
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr "Nom de fichier vide, ignoré"
|
||||
|
||||
# See note from translator above titled "file status flags".
|
||||
#: src/xz/file_io.c:817
|
||||
#: src/xz/file_io.c:834
|
||||
#, c-format
|
||||
msgid "Error restoring the status flags to standard input: %s"
|
||||
msgstr "Erreur de restauration du drapeau d'état de l'entrée standard : %s"
|
||||
|
||||
# See note from translator above titled "file status flags".
|
||||
#: src/xz/file_io.c:865
|
||||
#: src/xz/file_io.c:882
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard output: %s"
|
||||
msgstr "Erreur de lecture du drapeau d'état du fichier depuis la sortie standard : %s"
|
||||
|
||||
#: src/xz/file_io.c:1043
|
||||
#: src/xz/file_io.c:1060
|
||||
#, 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:1055
|
||||
#: src/xz/file_io.c:1072
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s : Impossible de fermer le fichier : %s"
|
||||
|
||||
#: src/xz/file_io.c:1091 src/xz/file_io.c:1354
|
||||
#: src/xz/file_io.c:1108 src/xz/file_io.c:1371
|
||||
#, 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:1192
|
||||
#: src/xz/file_io.c:1209
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s : Erreur d'écriture : %s"
|
||||
|
||||
#: src/xz/file_io.c:1222
|
||||
#: src/xz/file_io.c:1239
|
||||
#, 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:1246
|
||||
#: src/xz/file_io.c:1263
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr "%s : Fin de fichier inattendue"
|
||||
|
||||
#: src/xz/file_io.c:1305
|
||||
#: src/xz/file_io.c:1322
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s : Erreur d'écriture : %s"
|
||||
@ -280,7 +296,6 @@ msgstr "Désactivé"
|
||||
|
||||
#: src/xz/hardware.c:269
|
||||
#, fuzzy
|
||||
#| msgid "Total amount of physical memory (RAM): "
|
||||
msgid "Amount of physical memory (RAM):"
|
||||
msgstr "Quantité totale de mémoire physique (RAM) : "
|
||||
|
||||
@ -298,7 +313,6 @@ msgstr ""
|
||||
|
||||
#: src/xz/hardware.c:273
|
||||
#, fuzzy
|
||||
#| msgid "Memory usage limit for decompression: "
|
||||
msgid "Multi-threaded decompression:"
|
||||
msgstr "Limite d'utilisation pour la décompression : "
|
||||
|
||||
@ -312,7 +326,6 @@ msgstr ""
|
||||
|
||||
#: src/xz/hardware.c:299
|
||||
#, fuzzy
|
||||
#| msgid "Memory usage limit reached"
|
||||
msgid "Memory usage limits:"
|
||||
msgstr "Limite d'utilisation mémoire atteinte"
|
||||
|
||||
@ -326,13 +339,11 @@ msgstr ""
|
||||
|
||||
#: src/xz/list.c:70
|
||||
#, fuzzy
|
||||
#| msgid " Compressed size: %s\n"
|
||||
msgid "Compressed size:"
|
||||
msgstr " Taille données avec compression : %s\n"
|
||||
|
||||
#: src/xz/list.c:71
|
||||
#, fuzzy
|
||||
#| msgid " Uncompressed size: %s\n"
|
||||
msgid "Uncompressed size:"
|
||||
msgstr " Taille données sans compression : %s\n"
|
||||
|
||||
@ -346,25 +357,21 @@ msgstr ""
|
||||
|
||||
#: src/xz/list.c:74
|
||||
#, fuzzy
|
||||
#| msgid " Stream padding: %s\n"
|
||||
msgid "Stream Padding:"
|
||||
msgstr " Octets de rembourrage du flux : %s\n"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
#, fuzzy
|
||||
#| msgid " Memory needed: %s MiB\n"
|
||||
msgid "Memory needed:"
|
||||
msgstr " Mémoire nécessaire : %s MiB\n"
|
||||
|
||||
#: src/xz/list.c:76
|
||||
#, fuzzy
|
||||
#| msgid " Sizes in headers: %s\n"
|
||||
msgid "Sizes in headers:"
|
||||
msgstr " Tailles stockées dans l'en-tête : %s\n"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
#, fuzzy
|
||||
#| msgid " Number of files: %s\n"
|
||||
msgid "Number of files:"
|
||||
msgstr " Nombre de fichiers : %s\n"
|
||||
|
||||
@ -398,7 +405,6 @@ msgstr ""
|
||||
|
||||
#: src/xz/list.c:129
|
||||
#, fuzzy
|
||||
#| msgid "Totals:"
|
||||
msgid "TotalSize"
|
||||
msgstr "Totaux :"
|
||||
|
||||
@ -508,41 +514,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:730
|
||||
#: src/xz/list.c:731
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr "Flux Blocs Compressé Décompressé Ratio Vérif. Nom de fichier"
|
||||
|
||||
#: src/xz/list.c:1025 src/xz/list.c:1203
|
||||
#: src/xz/list.c:1026 src/xz/list.c:1204
|
||||
msgid "Yes"
|
||||
msgstr "Oui"
|
||||
|
||||
#: src/xz/list.c:1025 src/xz/list.c:1203
|
||||
#: src/xz/list.c:1026 src/xz/list.c:1204
|
||||
msgid "No"
|
||||
msgstr "Non"
|
||||
|
||||
#: src/xz/list.c:1027 src/xz/list.c:1205
|
||||
#: src/xz/list.c:1028 src/xz/list.c:1206
|
||||
#, 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:1178
|
||||
#: src/xz/list.c:1179
|
||||
#, 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:1191
|
||||
#: src/xz/list.c:1192
|
||||
msgid "Totals:"
|
||||
msgstr "Totaux :"
|
||||
|
||||
#: src/xz/list.c:1269
|
||||
#: src/xz/list.c:1270
|
||||
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:1275
|
||||
#: src/xz/list.c:1276
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr "--list est incompatible avec la lecture sur l'entrée standard"
|
||||
|
||||
@ -573,7 +579,7 @@ 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:725
|
||||
#: src/xz/message.c:670 src/xz/message.c:725
|
||||
#, c-format
|
||||
msgid "%s: "
|
||||
msgstr "%s : "
|
||||
@ -721,11 +727,6 @@ msgstr ""
|
||||
|
||||
#: src/xz/message.c:1007
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| " -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
#| " `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
#| " -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
#| " `crc32', `crc64' (default), or `sha256'"
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
|
||||
@ -800,16 +801,10 @@ msgstr ""
|
||||
" --flush-timeout=TIMEOUT\n"
|
||||
" pendant la compression, si plus de TIMEOUT ms ont passées\n"
|
||||
" depuis le dernier flush et que la lecture est bloquée,\n"
|
||||
" toutes les données en attente snt écrites"
|
||||
" toutes les données en attente sont écrites"
|
||||
|
||||
#: src/xz/message.c:1043
|
||||
#, fuzzy, no-c-format
|
||||
#| msgid ""
|
||||
#| " --memlimit-compress=LIMIT\n"
|
||||
#| " --memlimit-decompress=LIMIT\n"
|
||||
#| " -M, --memlimit=LIMIT\n"
|
||||
#| " set memory usage limit for compression, decompression,\n"
|
||||
#| " or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
@ -874,16 +869,6 @@ msgstr ""
|
||||
|
||||
#: src/xz/message.c:1082
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "\n"
|
||||
#| " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
#| " --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
|
||||
#| " --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
|
||||
#| " --arm[=OPTS] ARM BCJ filter (little endian only)\n"
|
||||
#| " --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
|
||||
#| " --sparc[=OPTS] SPARC BCJ filter\n"
|
||||
#| " Valid OPTS for all BCJ filters:\n"
|
||||
#| " start=NUM start offset for conversions (default=0)"
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@ -1025,22 +1010,17 @@ msgstr "Préréglage LZMA1/LZMA2 non reconnu : %s"
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr "La somme de lc et lp ne doit pas dépasser 4"
|
||||
|
||||
#: src/xz/suffix.c:137 src/xz/suffix.c:268
|
||||
#, 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:168
|
||||
#: src/xz/suffix.c:160
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s : Le fichier a un suffixe inconnu, ignoré"
|
||||
|
||||
#: src/xz/suffix.c:189
|
||||
#: src/xz/suffix.c:181
|
||||
#, 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:405
|
||||
#: src/xz/suffix.c:388
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: Suffixe de nom de fichier invalide"
|
||||
@ -1080,6 +1060,9 @@ msgstr "Impossible d'écrire vers la sortie standard"
|
||||
msgid "Unknown error"
|
||||
msgstr "Erreur inconnue"
|
||||
|
||||
#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
#~ msgstr "Le `match finder' choisi nécessite au moins nice=%<PRIu32>"
|
||||
|
||||
#~ msgid "Sandbox is disabled due to incompatible command line arguments"
|
||||
#~ msgstr "La sandbox est désactivée car elle est incompatible avec les arguments passés"
|
||||
|
||||
@ -1089,19 +1072,15 @@ msgstr "Erreur inconnue"
|
||||
#~ msgid "Memory usage limit for compression: "
|
||||
#~ msgstr "Limite d'utilisation pour la compression : "
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Streams: %s\n"
|
||||
#~ msgstr " Flux : %s\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Blocks: %s\n"
|
||||
#~ msgstr " Blocs : %s\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Ratio: %s\n"
|
||||
#~ msgstr " Ratio : %s\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Check: %s\n"
|
||||
#~ msgstr " Vérification : %s\n"
|
||||
|
||||
@ -1112,7 +1091,6 @@ msgstr "Erreur inconnue"
|
||||
#~ " Flux :\n"
|
||||
#~ " Flux Blocs PositionComp PositionDécomp TailleComp TailleDécomp Ratio Vérif. Bourrage"
|
||||
|
||||
#, c-format
|
||||
#~ msgid ""
|
||||
#~ " Blocks:\n"
|
||||
#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
|
||||
@ -1120,14 +1098,9 @@ msgstr "Erreur inconnue"
|
||||
#~ " Blocs :\n"
|
||||
#~ " Flux Bloc PositionComp PositionDécomp TailleTot TailleDécomp Ratio Vérif."
|
||||
|
||||
#, c-format
|
||||
#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
#~ msgstr " ValVérif %*sEn-tête Drapeaux TailleComp UtilMém Filtres"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
#~ msgstr "Le `match finder' choisi nécessite au moins nice=%<PRIu32>"
|
||||
|
||||
#~ msgid "Error setting O_NONBLOCK on standard input: %s"
|
||||
#~ msgstr "Impossible d'établir le drapeau O_NONBLOCK sur la sortie standard : %s"
|
||||
|
||||
|
174
po/pt_BR.po
174
po/pt_BR.po
@ -1,13 +1,14 @@
|
||||
# Brazilian Portuguese translations for xz package
|
||||
# Traduções em português brasileiro para o pacote xz.
|
||||
# This file is put in the public domain.
|
||||
# Rafael Fontenelle <rafaelff@gnome.org>, 2019-2021.
|
||||
# Rafael Fontenelle <rafaelff@gnome.org>, 2019-2023.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz 5.2.4\n"
|
||||
"Project-Id-Version: xz 5.4.0-pre2\n"
|
||||
"Report-Msgid-Bugs-To: xz@tukaani.org\n"
|
||||
"POT-Creation-Date: 2023-01-11 19:01+0200\n"
|
||||
"PO-Revision-Date: 2021-01-06 22:30-0300\n"
|
||||
"POT-Creation-Date: 2023-01-13 20:21+0800\n"
|
||||
"PO-Revision-Date: 2023-01-12 14:40-0300\n"
|
||||
"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
|
||||
"Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge.net>\n"
|
||||
"Language: pt_BR\n"
|
||||
@ -15,8 +16,8 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"X-Generator: Virtaal 1.0.0-beta1\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||
"X-Generator: Gtranslator 42.0\n"
|
||||
|
||||
#: src/xz/args.c:77
|
||||
#, c-format
|
||||
@ -61,7 +62,7 @@ msgstr "Suporte a descompressão foi desabilitado em tempo de compilação"
|
||||
|
||||
#: src/xz/args.c:701
|
||||
msgid "Compression of lzip files (.lz) is not supported"
|
||||
msgstr ""
|
||||
msgstr "A compactação de arquivos lzip (.lz) não é suportada"
|
||||
|
||||
#: src/xz/coder.c:115
|
||||
msgid "Maximum number of filters is four"
|
||||
@ -110,21 +111,19 @@ msgid "Decompression will need %s MiB of memory."
|
||||
msgstr "A descompressão precisará de %s MiB de memória."
|
||||
|
||||
#: src/xz/coder.c:309
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
#, c-format
|
||||
msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Ajustado o número de threads de %s de %s para não exceder o limite de uso de memória de %s MiB"
|
||||
msgstr "Reduzido o número de threads de %s para %s para não exceder o limite de uso de memória de %s MiB"
|
||||
|
||||
#: src/xz/coder.c:329
|
||||
#, c-format
|
||||
msgid "Reduced the number of threads from %s to one. The automatic memory usage limit of %s MiB is still being exceeded. %s MiB of memory is required. Continuing anyway."
|
||||
msgstr ""
|
||||
msgstr "Reduzido o número de threads de %s para um. O limite de uso de memória automática de %s MiB ainda está sendo excedido. %s MiB de memória é necessário. Continuando de qualquer maneira."
|
||||
|
||||
#: src/xz/coder.c:356
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
#, c-format
|
||||
msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Ajustado o número de threads de %s de %s para não exceder o limite de uso de memória de %s MiB"
|
||||
msgstr "Alternando para o modo de thread única para não exceder o limite de uso de memória de %s MiB"
|
||||
|
||||
#: src/xz/coder.c:411
|
||||
#, c-format
|
||||
@ -268,164 +267,141 @@ msgstr "%s: Erro de escrita: %s"
|
||||
msgid "Disabled"
|
||||
msgstr "Desabilitado"
|
||||
|
||||
# Espaços adicionados para manter alinhamento com mensagens adjacentes -- Rafael
|
||||
#: src/xz/hardware.c:269
|
||||
#, fuzzy
|
||||
#| msgid "Total amount of physical memory (RAM): "
|
||||
msgid "Amount of physical memory (RAM):"
|
||||
msgstr "Quantidade total de memória física (RAM):"
|
||||
|
||||
#: src/xz/hardware.c:270
|
||||
msgid "Number of processor threads:"
|
||||
msgstr ""
|
||||
msgstr "Número de threads de processador:"
|
||||
|
||||
#: src/xz/hardware.c:271
|
||||
msgid "Compression:"
|
||||
msgstr ""
|
||||
msgstr "Compactação:"
|
||||
|
||||
#: src/xz/hardware.c:272
|
||||
msgid "Decompression:"
|
||||
msgstr ""
|
||||
msgstr "Descompactação:"
|
||||
|
||||
# Espaços reduzidos para manter alinhamento com mensagens adjacentes -- Rafael
|
||||
#: src/xz/hardware.c:273
|
||||
#, fuzzy
|
||||
#| msgid "Memory usage limit for decompression: "
|
||||
msgid "Multi-threaded decompression:"
|
||||
msgstr "Limite de uso de memória para descompressão: "
|
||||
msgstr "Descompactação com várias threads:"
|
||||
|
||||
#: src/xz/hardware.c:274
|
||||
msgid "Default for -T0:"
|
||||
msgstr ""
|
||||
msgstr "Padrão para -T0:"
|
||||
|
||||
#: src/xz/hardware.c:292
|
||||
msgid "Hardware information:"
|
||||
msgstr ""
|
||||
msgstr "Informações de hardware:"
|
||||
|
||||
#: src/xz/hardware.c:299
|
||||
#, fuzzy
|
||||
#| msgid "Memory usage limit reached"
|
||||
msgid "Memory usage limits:"
|
||||
msgstr "Limite de uso de memória alcançado"
|
||||
msgstr "Memory usage limits:"
|
||||
|
||||
#: src/xz/list.c:68
|
||||
msgid "Streams:"
|
||||
msgstr ""
|
||||
msgstr "Fluxos:"
|
||||
|
||||
#: src/xz/list.c:69
|
||||
msgid "Blocks:"
|
||||
msgstr ""
|
||||
msgstr "Blocos:"
|
||||
|
||||
#: src/xz/list.c:70
|
||||
#, fuzzy
|
||||
#| msgid " Compressed size: %s\n"
|
||||
msgid "Compressed size:"
|
||||
msgstr " Tam. comprimido: %s\n"
|
||||
msgstr "Tamanho compactado:"
|
||||
|
||||
#: src/xz/list.c:71
|
||||
#, fuzzy
|
||||
#| msgid " Uncompressed size: %s\n"
|
||||
msgid "Uncompressed size:"
|
||||
msgstr " Tam. descomprimido: %s\n"
|
||||
msgstr "Tamanho não compactado:"
|
||||
|
||||
#: src/xz/list.c:72
|
||||
msgid "Ratio:"
|
||||
msgstr ""
|
||||
msgstr "Proporção:"
|
||||
|
||||
#: src/xz/list.c:73
|
||||
msgid "Check:"
|
||||
msgstr ""
|
||||
msgstr "Verificação:"
|
||||
|
||||
#: src/xz/list.c:74
|
||||
#, fuzzy
|
||||
#| msgid " Stream padding: %s\n"
|
||||
msgid "Stream Padding:"
|
||||
msgstr " Ajuste do fluxo: %s\n"
|
||||
msgstr "Ajuste do fluxo:"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
#, fuzzy
|
||||
#| msgid " Memory needed: %s MiB\n"
|
||||
msgid "Memory needed:"
|
||||
msgstr " Memória exigida: %s MiB\n"
|
||||
msgstr "Memória exigida:"
|
||||
|
||||
# Espaço adicionado para promover alinhamento, vide "xz -lvv foo.xz"
|
||||
#: src/xz/list.c:76
|
||||
#, fuzzy
|
||||
#| msgid " Sizes in headers: %s\n"
|
||||
msgid "Sizes in headers:"
|
||||
msgstr " Tam. cabeçalhos: %s\n"
|
||||
msgstr "Tamanhos nos cabeçalhos:"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
#, fuzzy
|
||||
#| msgid " Number of files: %s\n"
|
||||
msgid "Number of files:"
|
||||
msgstr " Núm. de arquivos: %s\n"
|
||||
msgstr "Número de arquivos:"
|
||||
|
||||
#: src/xz/list.c:122
|
||||
msgid "Stream"
|
||||
msgstr ""
|
||||
msgstr "Fluxo"
|
||||
|
||||
#: src/xz/list.c:123
|
||||
msgid "Block"
|
||||
msgstr ""
|
||||
msgstr "Bloco"
|
||||
|
||||
#: src/xz/list.c:124
|
||||
msgid "Blocks"
|
||||
msgstr ""
|
||||
msgstr "Blocos"
|
||||
|
||||
#: src/xz/list.c:125
|
||||
msgid "CompOffset"
|
||||
msgstr ""
|
||||
msgstr "DeslocComp"
|
||||
|
||||
#: src/xz/list.c:126
|
||||
msgid "UncompOffset"
|
||||
msgstr ""
|
||||
msgstr "DeslocDescomp"
|
||||
|
||||
#: src/xz/list.c:127
|
||||
msgid "CompSize"
|
||||
msgstr ""
|
||||
msgstr "TamComp"
|
||||
|
||||
#: src/xz/list.c:128
|
||||
msgid "UncompSize"
|
||||
msgstr ""
|
||||
msgstr "TamDescomp"
|
||||
|
||||
#: src/xz/list.c:129
|
||||
#, fuzzy
|
||||
#| msgid "Totals:"
|
||||
msgid "TotalSize"
|
||||
msgstr "Totais:"
|
||||
msgstr "TamTotal"
|
||||
|
||||
#: src/xz/list.c:130
|
||||
msgid "Ratio"
|
||||
msgstr ""
|
||||
msgstr "Proporção"
|
||||
|
||||
#: src/xz/list.c:131
|
||||
msgid "Check"
|
||||
msgstr ""
|
||||
msgstr "Verificação"
|
||||
|
||||
#: src/xz/list.c:132
|
||||
msgid "CheckVal"
|
||||
msgstr ""
|
||||
msgstr "ValorVerific."
|
||||
|
||||
#: src/xz/list.c:133
|
||||
msgid "Padding"
|
||||
msgstr ""
|
||||
msgstr "Preench."
|
||||
|
||||
#: src/xz/list.c:134
|
||||
msgid "Header"
|
||||
msgstr ""
|
||||
msgstr "Cabeçalho"
|
||||
|
||||
#: src/xz/list.c:135
|
||||
msgid "Flags"
|
||||
msgstr ""
|
||||
msgstr "Sinalizadores"
|
||||
|
||||
#: src/xz/list.c:136
|
||||
msgid "MemUsage"
|
||||
msgstr ""
|
||||
msgstr "UsoMem"
|
||||
|
||||
#: src/xz/list.c:137
|
||||
msgid "Filters"
|
||||
msgstr ""
|
||||
msgstr "Filtros"
|
||||
|
||||
#. TRANSLATORS: Indicates that there is no integrity check.
|
||||
#. This string is used in tables. In older xz version this
|
||||
@ -726,12 +702,6 @@ msgstr ""
|
||||
" Opções básicas de formato de arquivo e compressão:\n"
|
||||
|
||||
#: src/xz/message.c:1007
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| " -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
#| " `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
#| " -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
#| " `crc32', `crc64' (default), or `sha256'"
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
|
||||
@ -740,7 +710,7 @@ msgid ""
|
||||
msgstr ""
|
||||
" -F, --format=FMT formato de arquivo para codificar ou decodificar;\n"
|
||||
" valores possíveis são\n"
|
||||
" \"auto\" (padrão), \"xz\", \"lzma\" e \"raw\"\n"
|
||||
" \"auto\" (padrão), \"xz\", \"lzma\", \"lzip\" e \"raw\"\n"
|
||||
" -C, --check=VERIF tipo de verificação de integridade: \"none\" (cuidado!),\n"
|
||||
" \"crc32\", \"crc64\" (padrão) ou \"sha256\""
|
||||
|
||||
@ -810,13 +780,7 @@ msgstr ""
|
||||
" serão liberados"
|
||||
|
||||
#: src/xz/message.c:1043
|
||||
#, fuzzy, no-c-format
|
||||
#| msgid ""
|
||||
#| " --memlimit-compress=LIMIT\n"
|
||||
#| " --memlimit-decompress=LIMIT\n"
|
||||
#| " -M, --memlimit=LIMIT\n"
|
||||
#| " set memory usage limit for compression, decompression,\n"
|
||||
#| " or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
@ -828,10 +792,11 @@ msgid ""
|
||||
msgstr ""
|
||||
" --memlimit-compress=LIMITE\n"
|
||||
" --memlimit-decompress=LIMITE\n"
|
||||
" --memlimit-mt-decompress=LIMITE\n"
|
||||
" -M, --memlimit=LIMITE\n"
|
||||
" define o limite de uso de memória para compressão,\n"
|
||||
" descompressão ou ambos; LIMITE é em bytes, % de RAM\n"
|
||||
" ou 0 para padrões"
|
||||
" descompressão, compactação em threads ou todas essas;\n"
|
||||
" LIMITE é em bytes, % de RAM ou 0 para padrões"
|
||||
|
||||
#: src/xz/message.c:1052
|
||||
msgid ""
|
||||
@ -881,17 +846,6 @@ msgstr ""
|
||||
" 0=automatic (padrão)"
|
||||
|
||||
#: src/xz/message.c:1082
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "\n"
|
||||
#| " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
#| " --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
|
||||
#| " --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
|
||||
#| " --arm[=OPTS] ARM BCJ filter (little endian only)\n"
|
||||
#| " --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
|
||||
#| " --sparc[=OPTS] SPARC BCJ filter\n"
|
||||
#| " Valid OPTS for all BCJ filters:\n"
|
||||
#| " start=NUM start offset for conversions (default=0)"
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@ -906,14 +860,15 @@ msgid ""
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --x86[=OPÇÕES] filtro BCJ x86 (32 bits e 64 bits)\n"
|
||||
" --arm[=OPÇÕES] filtro BCJ ARM\n"
|
||||
" --armthumb[=OPÇÕES] filtro BCJ ARM-Thumb\n"
|
||||
" --arm64[=OPÇÕES] filtro BCJ ARM64\n"
|
||||
" --powerpc[=OPÇÕES] filtro BCJ PowerPC (big endian apenas)\n"
|
||||
" --ia64[=OPÇÕES] filtro BCJ IA-64 (Itanium)\n"
|
||||
" --arm[=OPÇÕES] filtro BCJ ARM (little endian apenas)\n"
|
||||
" --armthumb[=OPÇÕES] filtro BCJ ARM-Thumb (little endian apenas)\n"
|
||||
" --sparc[=OPÇÕES] filtro BCJ SPARC\n"
|
||||
" OPÇÕES válidas para todos os filtros BCJ:\n"
|
||||
" start=NUM deslocamento inicial para conversões\n"
|
||||
" (default=0)"
|
||||
" (padrão=0)"
|
||||
|
||||
#: src/xz/message.c:1095
|
||||
msgid ""
|
||||
@ -1086,23 +1041,25 @@ msgstr "A escrita para a saída padrão falhou"
|
||||
msgid "Unknown error"
|
||||
msgstr "Erro desconhecido"
|
||||
|
||||
#~ msgid "Sandbox is disabled due to incompatible command line arguments"
|
||||
#~ msgstr "Sandbox está desabilitado em razão de argumentos de linha de comando incompatíveis"
|
||||
|
||||
#~ msgid "Sandbox was successfully enabled"
|
||||
#~ msgstr "Sandbox foi habilitado com sucesso"
|
||||
|
||||
# Espaços adicionados para manter alinhamento com mensagens adjacentes -- Rafael
|
||||
#~ msgid "Memory usage limit for compression: "
|
||||
#~ msgstr "Limite de uso de memória para compressão: "
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Streams: %s\n"
|
||||
#~ msgstr " Fluxos: %s\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Blocks: %s\n"
|
||||
#~ msgstr " Blocos: %s\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Ratio: %s\n"
|
||||
#~ msgstr " Proporção: %s\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Check: %s\n"
|
||||
#~ msgstr " Verificação: %s\n"
|
||||
|
||||
@ -1113,7 +1070,6 @@ msgstr "Erro desconhecido"
|
||||
#~ " Fluxos:\n"
|
||||
#~ " Fluxo Blocos DeslocComp DeslocDescomp TamanhoComp TamanhoDescomp Propo Verif Ajuste"
|
||||
|
||||
#, c-format
|
||||
#~ msgid ""
|
||||
#~ " Blocks:\n"
|
||||
#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
|
||||
@ -1121,16 +1077,8 @@ msgstr "Erro desconhecido"
|
||||
#~ " Blocos:\n"
|
||||
#~ " Fluxo Bloco DeslocComp DeslocDescomp TamanhoTotal TamanhoDecomp Propo Verif"
|
||||
|
||||
#, c-format
|
||||
#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
#~ msgstr " ValVerif %*s Cabeç Sinaliz TamComp UsoMem Filtros"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
#~ msgstr "O localizador de correspondência selecionado requer pelo menos nice=%<PRIu32>"
|
||||
|
||||
#~ msgid "Sandbox is disabled due to incompatible command line arguments"
|
||||
#~ msgstr "Sandbox está desabilitado em razão de argumentos de linha de comando incompatíveis"
|
||||
|
||||
#~ msgid "Sandbox was successfully enabled"
|
||||
#~ msgstr "Sandbox foi habilitado com sucesso"
|
||||
|
126
po/tr.po
126
po/tr.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz 5.4.0-pre2\n"
|
||||
"Report-Msgid-Bugs-To: xz@tukaani.org\n"
|
||||
"POT-Creation-Date: 2023-01-11 19:01+0200\n"
|
||||
"POT-Creation-Date: 2022-12-03 00:34+0800\n"
|
||||
"PO-Revision-Date: 2022-12-05 19:00+0300\n"
|
||||
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
|
||||
"Language-Team: Turkish <gnome-turk@gnome.org>\n"
|
||||
@ -19,48 +19,48 @@ msgstr ""
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: src/xz/args.c:77
|
||||
#: src/xz/args.c:64
|
||||
#, c-format
|
||||
msgid "%s: Invalid argument to --block-list"
|
||||
msgstr "%s: --block-list için geçersiz argüman"
|
||||
|
||||
#: src/xz/args.c:87
|
||||
#: src/xz/args.c:74
|
||||
#, c-format
|
||||
msgid "%s: Too many arguments to --block-list"
|
||||
msgstr "%s: --block-list için çok fazla argüman"
|
||||
|
||||
#: src/xz/args.c:116
|
||||
#: src/xz/args.c:103
|
||||
msgid "0 can only be used as the last element in --block-list"
|
||||
msgstr "0, yalnızca --block-list içindeki son öge olarak kullanılabilir"
|
||||
|
||||
#: src/xz/args.c:451
|
||||
#: src/xz/args.c:436
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s: Bilinmeyen dosya biçimi türü"
|
||||
|
||||
#: src/xz/args.c:474 src/xz/args.c:482
|
||||
#: src/xz/args.c:459 src/xz/args.c:467
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s: Desteklenmeyen bütünlük denetimi türü"
|
||||
|
||||
#: src/xz/args.c:518
|
||||
#: src/xz/args.c:503
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr "'--files' veya '--files0' ile yalnızca bir dosya belirtilebilir."
|
||||
|
||||
#: src/xz/args.c:586
|
||||
#: src/xz/args.c:571
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "Çevre değişkeni %s, pek fazla argüman içeriyor"
|
||||
|
||||
#: src/xz/args.c:688
|
||||
#: src/xz/args.c:673
|
||||
msgid "Compression support was disabled at build time"
|
||||
msgstr "Sıkıştırma desteği, yapım sırasında devre dışı bırakıldı"
|
||||
|
||||
#: src/xz/args.c:695
|
||||
#: src/xz/args.c:680
|
||||
msgid "Decompression support was disabled at build time"
|
||||
msgstr "Sıkıştırma açma desteği, yapım sırasında devre dışı bırakıldı"
|
||||
|
||||
#: src/xz/args.c:701
|
||||
#: src/xz/args.c:686
|
||||
msgid "Compression of lzip files (.lz) is not supported"
|
||||
msgstr "lzip dosyalarının (.lz) sıkıştırılması desteklenmiyor"
|
||||
|
||||
@ -547,63 +547,63 @@ msgstr "Standart girdi'den dosya adları okunurken standart girdi'den veri okuna
|
||||
msgid "%s: "
|
||||
msgstr "%s: "
|
||||
|
||||
#: src/xz/message.c:797 src/xz/message.c:856
|
||||
#: src/xz/message.c:788 src/xz/message.c:847
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "İç hata (yazılım hatası)"
|
||||
|
||||
#: src/xz/message.c:804
|
||||
#: src/xz/message.c:795
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Sinyal işleyicileri tesis edilemiyor"
|
||||
|
||||
#: src/xz/message.c:813
|
||||
#: src/xz/message.c:804
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "Bütünlülük denetimi yok; dosya bütünlüğü doğrulanmıyor"
|
||||
|
||||
#: src/xz/message.c:816
|
||||
#: src/xz/message.c:807
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr "Desteklenmeyen bütünlülük denetimi türü; dosya bütünlüğü doğrulanmıyor"
|
||||
|
||||
#: src/xz/message.c:823
|
||||
#: src/xz/message.c:814
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Bellek kullanım sınırına erişildi"
|
||||
|
||||
#: src/xz/message.c:826
|
||||
#: src/xz/message.c:817
|
||||
msgid "File format not recognized"
|
||||
msgstr "Dosya biçimi tanımlanamıyor"
|
||||
|
||||
#: src/xz/message.c:829
|
||||
#: src/xz/message.c:820
|
||||
msgid "Unsupported options"
|
||||
msgstr "Desteklenmeyen seçenekler"
|
||||
|
||||
#: src/xz/message.c:832
|
||||
#: src/xz/message.c:823
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Sıkıştırılmış veri hasarlı"
|
||||
|
||||
#: src/xz/message.c:835
|
||||
#: src/xz/message.c:826
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Beklenmedik girdi sonu"
|
||||
|
||||
#: src/xz/message.c:877
|
||||
#: src/xz/message.c:868
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limiter is disabled."
|
||||
msgstr "%s MiB bellek gerekiyor. Sınırlandırıcı devre dışı bırakıldı."
|
||||
|
||||
#: src/xz/message.c:905
|
||||
#: src/xz/message.c:896
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "%s MiB bellek gerekiyor. Sınır, %s."
|
||||
|
||||
#: src/xz/message.c:924
|
||||
#: src/xz/message.c:915
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: Süzgeç zinciri: %s\n"
|
||||
|
||||
#: src/xz/message.c:935
|
||||
#: src/xz/message.c:926
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Daha fazla bilgi için '%s --help' deneyin."
|
||||
|
||||
#: src/xz/message.c:961
|
||||
#: src/xz/message.c:952
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
@ -614,15 +614,15 @@ msgstr ""
|
||||
".xz biçimindeki dosyaları sıkıştırın veya sıkıştırmasını açın.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:968
|
||||
#: src/xz/message.c:959
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr "Uzun seçenekler için zorunlu olan argümanlar kısa seçenekler için de geçerlidir.\n"
|
||||
|
||||
#: src/xz/message.c:972
|
||||
#: src/xz/message.c:963
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " İşlem kipi:\n"
|
||||
|
||||
#: src/xz/message.c:975
|
||||
#: src/xz/message.c:966
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
@ -634,7 +634,7 @@ msgstr ""
|
||||
" -t, --test sıkıştırılmış dosya bütünlüğünü sına\n"
|
||||
" -l, --list .xz dosyaları hakkında bilgi listele"
|
||||
|
||||
#: src/xz/message.c:981
|
||||
#: src/xz/message.c:972
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
@ -642,7 +642,7 @@ msgstr ""
|
||||
"\n"
|
||||
" İşlem değiştiricileri:\n"
|
||||
|
||||
#: src/xz/message.c:984
|
||||
#: src/xz/message.c:975
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
@ -653,7 +653,7 @@ msgstr ""
|
||||
" sıkıştır/sıkıştırmayı aç\n"
|
||||
" -c, --stdout standart çıktıya yaz ve girdi dosyalarını silme"
|
||||
|
||||
#: src/xz/message.c:993
|
||||
#: src/xz/message.c:984
|
||||
msgid ""
|
||||
" --single-stream decompress only the first stream, and silently\n"
|
||||
" ignore possible remaining input data"
|
||||
@ -661,7 +661,7 @@ msgstr ""
|
||||
" --single-stream yalnızca ilk akışın sıkıştırmasını aç ve sessizce\n"
|
||||
" kalan girdi verisini yok say"
|
||||
|
||||
#: src/xz/message.c:996
|
||||
#: src/xz/message.c:987
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
@ -678,7 +678,7 @@ msgstr ""
|
||||
" --files0[=DSYA] --files gibi; ancak sonlandırıcı olarak null karakteri\n"
|
||||
" kullan"
|
||||
|
||||
#: src/xz/message.c:1005
|
||||
#: src/xz/message.c:996
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
@ -686,7 +686,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Temel dosya biçimi ve sıkıştırma seçenekleri:\n"
|
||||
|
||||
#: src/xz/message.c:1007
|
||||
#: src/xz/message.c:998
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
|
||||
@ -699,11 +699,11 @@ msgstr ""
|
||||
" -C, --check=DNTLE bütünlük denetimi türü: `none' (dikkatli kullanın),\n"
|
||||
" `crc32', `crc64' (öntanımlı) veya `sha256'"
|
||||
|
||||
#: src/xz/message.c:1012
|
||||
#: src/xz/message.c:1003
|
||||
msgid " --ignore-check don't verify the integrity check when decompressing"
|
||||
msgstr " --ignore-check sıkıştırma açarken bütünlük denetimini doğrulama"
|
||||
|
||||
#: src/xz/message.c:1016
|
||||
#: src/xz/message.c:1007
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
@ -711,7 +711,7 @@ msgstr ""
|
||||
" -0 ... -9 sıkıştırma önayarı; öntanımlı 6; 7-9 kullanmadan önce\n"
|
||||
" sıkıştırma açıcı bellek kullanımını hesaba katın!"
|
||||
|
||||
#: src/xz/message.c:1020
|
||||
#: src/xz/message.c:1011
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
@ -720,7 +720,7 @@ msgstr ""
|
||||
" iyileştirmeye çalış; sıkıştırma açıcı bellek\n"
|
||||
" gereksinimlerini etkilemez"
|
||||
|
||||
#: src/xz/message.c:1024
|
||||
#: src/xz/message.c:1015
|
||||
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"
|
||||
@ -729,7 +729,7 @@ msgstr ""
|
||||
" işlemci çekirdeği kadar iş parçacığı kullanmak için\n"
|
||||
" 0'a ayarlayın"
|
||||
|
||||
#: src/xz/message.c:1029
|
||||
#: src/xz/message.c:1020
|
||||
msgid ""
|
||||
" --block-size=SIZE\n"
|
||||
" start a new .xz block after every SIZE bytes of input;\n"
|
||||
@ -740,7 +740,7 @@ msgstr ""
|
||||
" iş parçacığı kullanan sıkıştırma için blok boyutunu\n"
|
||||
" ayarlamak için bunu kullanın"
|
||||
|
||||
#: src/xz/message.c:1033
|
||||
#: src/xz/message.c:1024
|
||||
msgid ""
|
||||
" --block-list=SIZES\n"
|
||||
" start a new .xz block after the given comma-separated\n"
|
||||
@ -750,7 +750,7 @@ msgstr ""
|
||||
" sıkıştırılmamış verinin virgülle ayrılmış verilen\n"
|
||||
" aralıklarından sonra yeni bir .xz bloku başlat"
|
||||
|
||||
#: src/xz/message.c:1037
|
||||
#: src/xz/message.c:1028
|
||||
msgid ""
|
||||
" --flush-timeout=TIMEOUT\n"
|
||||
" when compressing, if more than TIMEOUT milliseconds has\n"
|
||||
@ -762,7 +762,7 @@ msgstr ""
|
||||
" milisaniye geçmişse ve daha çok girdi okuma bloklarsa\n"
|
||||
" tüm bekleyen veri floşlanır"
|
||||
|
||||
#: src/xz/message.c:1043
|
||||
#: src/xz/message.c:1034
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
@ -781,7 +781,7 @@ msgstr ""
|
||||
" açma veya tümü için bellek kullanımı sınırını ayarla;\n"
|
||||
" LİMİT, bayt, RAM % veya öntanımlılar için 0'dır"
|
||||
|
||||
#: src/xz/message.c:1052
|
||||
#: src/xz/message.c:1043
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
@ -789,7 +789,7 @@ msgstr ""
|
||||
" --no-adjust sıkıştırma ayarları bellek kullanımı sınırını aşarsa\n"
|
||||
" ayarı aşağı doğru düzeltmek yerine bir hata ver"
|
||||
|
||||
#: src/xz/message.c:1058
|
||||
#: src/xz/message.c:1049
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
@ -797,7 +797,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Sıkıştırma için özel süzgeç zinciri (önayar kullanımı alternatifi):"
|
||||
|
||||
#: src/xz/message.c:1067
|
||||
#: src/xz/message.c:1058
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
@ -826,7 +826,7 @@ msgstr ""
|
||||
" mf=AD eşleşme bul (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=NUM en büyük arama derinliği; 0=oto (öntanımlı)"
|
||||
|
||||
#: src/xz/message.c:1082
|
||||
#: src/xz/message.c:1073
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@ -850,7 +850,7 @@ msgstr ""
|
||||
" Tüm BCJ süzgeçleri için geçerli SÇNKLR:\n"
|
||||
" start=NUM dönüşümler başlangıç ofseti (öntanımlı=0)"
|
||||
|
||||
#: src/xz/message.c:1095
|
||||
#: src/xz/message.c:1086
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
@ -863,7 +863,7 @@ msgstr ""
|
||||
" dist=NUM birbirinden çırakılar baytlar arasındaki\n"
|
||||
" uzaklık (1-256; 1)"
|
||||
|
||||
#: src/xz/message.c:1103
|
||||
#: src/xz/message.c:1094
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
@ -871,7 +871,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Diğer seçenekler:\n"
|
||||
|
||||
#: src/xz/message.c:1106
|
||||
#: src/xz/message.c:1097
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
@ -880,17 +880,17 @@ msgstr ""
|
||||
" belirt\n"
|
||||
" -v, --verbose ayrıntılı ol; daha da çok ayrıntı için iki kez belirt"
|
||||
|
||||
#: src/xz/message.c:1111
|
||||
#: src/xz/message.c:1102
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn uyarıların çıkış durumunu etkilemesine izin verme"
|
||||
|
||||
#: src/xz/message.c:1113
|
||||
#: src/xz/message.c:1104
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr ""
|
||||
" --robot makine-ayrıştırılabilir iletiler kullan (betikler için\n"
|
||||
" yararlı)"
|
||||
|
||||
#: src/xz/message.c:1116
|
||||
#: src/xz/message.c:1107
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
@ -898,7 +898,7 @@ msgstr ""
|
||||
" --info-memory toplam RAM miktarını ve şu anki bellek kullanımı\n"
|
||||
" sınırlarını görüntüle ve çık"
|
||||
|
||||
#: src/xz/message.c:1119
|
||||
#: src/xz/message.c:1110
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
@ -906,7 +906,7 @@ msgstr ""
|
||||
" -h, --help kısa yardımı görüntüle (temel seçenekleri listeler)\n"
|
||||
" -H, --long-help bu uzun yardımı görüntüle ve çık"
|
||||
|
||||
#: src/xz/message.c:1123
|
||||
#: src/xz/message.c:1114
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
@ -914,11 +914,11 @@ msgstr ""
|
||||
" -h, --help bu kısa yardımı görüntüle ve çık\n"
|
||||
" -H, --long-help uzun yardımı görüntüle (gelişmiş seçenekleri listeler)"
|
||||
|
||||
#: src/xz/message.c:1128
|
||||
#: src/xz/message.c:1119
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version sürüm numarasını görüntüle ve çık"
|
||||
|
||||
#: src/xz/message.c:1130
|
||||
#: src/xz/message.c:1121
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
@ -930,17 +930,17 @@ 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:1136
|
||||
#: src/xz/message.c:1127
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr "Hataları <%s> adresine bildirin (İngilizce veya Fince).\n"
|
||||
|
||||
#: src/xz/message.c:1138
|
||||
#: src/xz/message.c:1129
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "%s ana sayfası: <%s>\n"
|
||||
|
||||
#: src/xz/message.c:1142
|
||||
#: src/xz/message.c:1133
|
||||
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
|
||||
msgstr "BU, NORMAL KULLANIM İÇİN OLMAYAN BİR GELİŞTİRME SÜRÜMÜDÜR."
|
||||
|
||||
@ -968,22 +968,22 @@ msgstr "Desteklenmeyen LZMA1/LZMA2 önayarı: %s"
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr "lc ve lp'nin toplamı 4'ü geçmemelidir"
|
||||
|
||||
#: src/xz/suffix.c:137 src/xz/suffix.c:268
|
||||
#: src/xz/suffix.c:134 src/xz/suffix.c:265
|
||||
#, c-format
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s: --format-raw ile, stdout'a yazılmıyorsa --suffix=.SUF gereklidir"
|
||||
|
||||
#: src/xz/suffix.c:168
|
||||
#: src/xz/suffix.c:165
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s: Dosya adında bilinmeyen sonek var, atlanıyor"
|
||||
|
||||
#: src/xz/suffix.c:189
|
||||
#: src/xz/suffix.c:186
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s: Dosyada '%s' soneki halihazırda var, atlanıyor"
|
||||
|
||||
#: src/xz/suffix.c:405
|
||||
#: src/xz/suffix.c:402
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s: Geçersiz dosya adı soneki"
|
||||
|
7
po/xz.pot-header
Normal file
7
po/xz.pot-header
Normal file
@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
#
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) The XZ Utils authors and contributors
|
||||
# This file is published under the BSD Zero Clause License.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
437
po/zh_CN.po
437
po/zh_CN.po
@ -1,14 +1,14 @@
|
||||
# Chinese translations for xz package
|
||||
# xz 软件包的简体中文翻译。
|
||||
# This file is put in the public domain.
|
||||
# Boyuan Yang <073plan@gmail.com>, 2019, 2022.
|
||||
# Boyuan Yang <073plan@gmail.com>, 2019, 2022, 2023, 2024.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz 5.4.0-pre1\n"
|
||||
"Project-Id-Version: xz 5.6.0-pre1\n"
|
||||
"Report-Msgid-Bugs-To: xz@tukaani.org\n"
|
||||
"POT-Creation-Date: 2023-01-11 19:01+0200\n"
|
||||
"PO-Revision-Date: 2022-11-30 13:31-0500\n"
|
||||
"POT-Creation-Date: 2024-01-26 19:40+0800\n"
|
||||
"PO-Revision-Date: 2024-02-05 15:15-0500\n"
|
||||
"Last-Translator: Boyuan Yang <073plan@gmail.com>\n"
|
||||
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
|
||||
"Language: zh_CN\n"
|
||||
@ -17,129 +17,181 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"X-Generator: Poedit 3.2\n"
|
||||
"X-Generator: Poedit 3.4.2\n"
|
||||
|
||||
#: src/xz/args.c:77
|
||||
#: src/xz/args.c:78
|
||||
#, c-format
|
||||
msgid "%s: Invalid argument to --block-list"
|
||||
msgstr "%s:--block-list 的无效参数"
|
||||
|
||||
#: src/xz/args.c:87
|
||||
#: src/xz/args.c:88
|
||||
#, c-format
|
||||
msgid "%s: Too many arguments to --block-list"
|
||||
msgstr "%s:--block-list 得到过多参数"
|
||||
|
||||
#: src/xz/args.c:116
|
||||
#: src/xz/args.c:125
|
||||
#, c-format
|
||||
msgid "In --block-list, block size is missing after filter chain number '%c:'"
|
||||
msgstr "在 --block-list 中,块大小在过滤器链编号 '%c:' 之后缺失"
|
||||
|
||||
#: src/xz/args.c:151
|
||||
msgid "0 can only be used as the last element in --block-list"
|
||||
msgstr "0 仅可用于 --block-list 的最后一个元素"
|
||||
|
||||
#: src/xz/args.c:451
|
||||
#: src/xz/args.c:540
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr "%s:位置文件格式类型"
|
||||
msgstr "%s:未知文件格式类型"
|
||||
|
||||
#: src/xz/args.c:474 src/xz/args.c:482
|
||||
#: src/xz/args.c:563 src/xz/args.c:571
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr "%s:不支持的完整性检查类型"
|
||||
|
||||
#: src/xz/args.c:518
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr "仅可使用“--files”或“--files0”指定一个文件。"
|
||||
#: src/xz/args.c:607
|
||||
msgid "Only one file can be specified with '--files' or '--files0'."
|
||||
msgstr "仅可使用 '--files' 或 '--files0' 指定单个文件。"
|
||||
|
||||
#: src/xz/args.c:586
|
||||
#. TRANSLATORS: This is a translatable
|
||||
#. string because French needs a space
|
||||
#. before the colon ("%s : %s").
|
||||
#: src/xz/args.c:622 src/xz/coder.c:1059 src/xz/coder.c:1075
|
||||
#: src/xz/coder.c:1375 src/xz/coder.c:1378 src/xz/file_io.c:686
|
||||
#: src/xz/file_io.c:760 src/xz/file_io.c:850 src/xz/file_io.c:1021
|
||||
#: src/xz/list.c:369 src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:591
|
||||
#: src/xz/list.c:600
|
||||
#, c-format
|
||||
msgid "%s: %s"
|
||||
msgstr "%s:%s"
|
||||
|
||||
#: src/xz/args.c:678
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr "环境变量 %s 包含过多参数"
|
||||
|
||||
#: src/xz/args.c:688
|
||||
#: src/xz/args.c:780
|
||||
msgid "Compression support was disabled at build time"
|
||||
msgstr "压缩支持已在构建时禁用"
|
||||
|
||||
#: src/xz/args.c:695
|
||||
#: src/xz/args.c:787
|
||||
msgid "Decompression support was disabled at build time"
|
||||
msgstr "解压支持已在构建时禁用"
|
||||
|
||||
#: src/xz/args.c:701
|
||||
#: src/xz/args.c:793
|
||||
msgid "Compression of lzip files (.lz) is not supported"
|
||||
msgstr "不支持对 lzip 文件 (.lz) 的压缩"
|
||||
|
||||
#: src/xz/coder.c:115
|
||||
#: src/xz/args.c:815
|
||||
msgid "--block-list is ignored unless compressing to the .xz format"
|
||||
msgstr "除非压缩为 .xz 格式,--block-list 将被忽略"
|
||||
|
||||
#: src/xz/args.c:828 src/xz/args.c:837
|
||||
msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "启用 --format-raw 选项时,必须指定 --suffix=.SUF 获知写入至标准输出"
|
||||
|
||||
#: src/xz/coder.c:141
|
||||
msgid "Maximum number of filters is four"
|
||||
msgstr "过滤器最多数量为四"
|
||||
|
||||
#: src/xz/coder.c:134
|
||||
#: src/xz/coder.c:179
|
||||
#, c-format
|
||||
msgid "Error in --filters%s=FILTERS option:"
|
||||
msgstr "在 --filters%s=过滤器 选项中出现错误:"
|
||||
|
||||
#: src/xz/coder.c:229
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr "内存用量限制对指定过滤器设置过低。"
|
||||
|
||||
#: src/xz/coder.c:169
|
||||
#: src/xz/coder.c:244
|
||||
#, c-format
|
||||
msgid "filter chain %u used by --block-list but not specified with --filters%u="
|
||||
msgstr "--block-list 使用了过滤器链 %u,但未经由 --filters%u= 指定"
|
||||
|
||||
#: src/xz/coder.c:375
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
msgstr "不推荐在 raw 模式使用预设等级。"
|
||||
|
||||
#: src/xz/coder.c:171
|
||||
#: src/xz/coder.c:377
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr "各个预设等级所使用的准确选项列表在不同软件版本之间可能不同。"
|
||||
|
||||
#: src/xz/coder.c:194
|
||||
#: src/xz/coder.c:403
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
msgstr ".lzma 格式只支持 LZMA1 过滤器"
|
||||
|
||||
#: src/xz/coder.c:202
|
||||
#: src/xz/coder.c:411
|
||||
msgid "LZMA1 cannot be used with the .xz format"
|
||||
msgstr "LZMA1 无法用于 .xz 格式"
|
||||
|
||||
#: src/xz/coder.c:219
|
||||
msgid "The filter chain is incompatible with --flush-timeout"
|
||||
msgstr "过滤器链和 --flush-timeout 不兼容"
|
||||
#: src/xz/coder.c:435
|
||||
#, c-format
|
||||
msgid "Filter chain %u is incompatible with --flush-timeout"
|
||||
msgstr "过滤器链 %u 和 --flush-timeout 不兼容"
|
||||
|
||||
#: src/xz/coder.c:225
|
||||
#: src/xz/coder.c:444
|
||||
msgid "Switching to single-threaded mode due to --flush-timeout"
|
||||
msgstr "因 --flush-timeout 而切换至单线程模式"
|
||||
|
||||
#: src/xz/coder.c:249
|
||||
#: src/xz/coder.c:485
|
||||
#, c-format
|
||||
msgid "Unsupported options in filter chain %u"
|
||||
msgstr "过滤器链 %u 中存在不支持的选项"
|
||||
|
||||
#: src/xz/coder.c:516
|
||||
#, c-format
|
||||
msgid "Using up to %<PRIu32> threads."
|
||||
msgstr "使用最多 %<PRIu32> 个线程。"
|
||||
|
||||
#: src/xz/coder.c:265
|
||||
#: src/xz/coder.c:532
|
||||
msgid "Unsupported filter chain or filter options"
|
||||
msgstr "不支持的过滤器链或过滤器选项"
|
||||
|
||||
#: src/xz/coder.c:277
|
||||
#: src/xz/coder.c:553
|
||||
#, c-format
|
||||
msgid "Decompression will need %s MiB of memory."
|
||||
msgstr "解压缩需要 %s MiB 的内存。"
|
||||
|
||||
#: src/xz/coder.c:309
|
||||
#: src/xz/coder.c:585
|
||||
#, c-format
|
||||
msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "已将所使用的线程数从 %s 减小为 %s,以不超出 %s MiB 的内存用量限制"
|
||||
|
||||
#: src/xz/coder.c:329
|
||||
#: src/xz/coder.c:605
|
||||
#, c-format
|
||||
msgid "Reduced the number of threads from %s to one. The automatic memory usage limit of %s MiB is still being exceeded. %s MiB of memory is required. Continuing anyway."
|
||||
msgstr "已将所使用的线程数从 %s 减小为 1。这仍然超出了自动的内存使用限制 %s MiB。需要 %s MiB 的内存。继续操作。"
|
||||
|
||||
#: src/xz/coder.c:356
|
||||
#: src/xz/coder.c:632
|
||||
#, c-format
|
||||
msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "正在切换到单线程模式以不超出 %s MiB 的内存用量限制"
|
||||
|
||||
#: src/xz/coder.c:411
|
||||
#: src/xz/coder.c:757
|
||||
#, 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 "已调整 LZMA%c 字典大小(从 %s MiB 调整为 %s MiB),以不超出 %s MiB 的内存用量限制"
|
||||
|
||||
#: src/xz/file_io.c:110 src/xz/file_io.c:118
|
||||
#: src/xz/coder.c:767
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
|
||||
msgid "Adjusted LZMA%c dictionary size for --filters%u from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "已调整 LZMA%c 字典大小(从 %s MiB 调整为 %s MiB),以不超出 %s MiB 的内存用量限制"
|
||||
|
||||
#: src/xz/coder.c:1141
|
||||
#, c-format
|
||||
msgid "Error changing to filter chain %u: %s"
|
||||
msgstr "更改为过滤器链 %u 时出错:%s"
|
||||
|
||||
#: src/xz/file_io.c:137 src/xz/file_io.c:145
|
||||
#, c-format
|
||||
msgid "Error creating a pipe: %s"
|
||||
msgstr "创建管道时出错:%s"
|
||||
|
||||
#: src/xz/file_io.c:235
|
||||
#: src/xz/file_io.c:333
|
||||
msgid "Failed to enable the sandbox"
|
||||
msgstr "沙盒启用失败"
|
||||
|
||||
#: src/xz/file_io.c:277
|
||||
#: src/xz/file_io.c:375
|
||||
#, c-format
|
||||
msgid "%s: poll() failed: %s"
|
||||
msgstr "%s:poll() 失败:%s"
|
||||
@ -154,111 +206,111 @@ msgstr "%s:poll() 失败:%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:344
|
||||
#: src/xz/file_io.c:442
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr "%s:文件似乎已移动,不再进行删除操作"
|
||||
|
||||
#: src/xz/file_io.c:351 src/xz/file_io.c:907
|
||||
#: src/xz/file_io.c:449 src/xz/file_io.c:1005
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr "%s:无法删除:%s"
|
||||
|
||||
#: src/xz/file_io.c:377
|
||||
#: src/xz/file_io.c:475
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr "%s:无法设置文件所有者:%s"
|
||||
|
||||
#: src/xz/file_io.c:390
|
||||
#: src/xz/file_io.c:488
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr "%s:无法设置文件所有组:%s"
|
||||
|
||||
#: src/xz/file_io.c:409
|
||||
#: src/xz/file_io.c:507
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s:无法设置文件权限:%s"
|
||||
|
||||
#: src/xz/file_io.c:535
|
||||
#: src/xz/file_io.c:633
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard input: %s"
|
||||
msgstr "从标准输入获取文件状态标志出错:%s"
|
||||
|
||||
#: src/xz/file_io.c:593 src/xz/file_io.c:655
|
||||
#: src/xz/file_io.c:691 src/xz/file_io.c:753
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s:是符号链接,跳过"
|
||||
|
||||
#: src/xz/file_io.c:684
|
||||
#: src/xz/file_io.c:782
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s:是目录,跳过"
|
||||
|
||||
#: src/xz/file_io.c:690
|
||||
#: src/xz/file_io.c:788
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s:不是标准文件,跳过"
|
||||
|
||||
#: src/xz/file_io.c:707
|
||||
#: src/xz/file_io.c:805
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr "%s:文件有设置用户ID或设置组ID标识,跳过"
|
||||
|
||||
#: src/xz/file_io.c:714
|
||||
#: src/xz/file_io.c:812
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr "%s:文件有粘滞位标识,跳过"
|
||||
|
||||
#: src/xz/file_io.c:721
|
||||
#: src/xz/file_io.c:819
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr "%s:输入文件有多于一个硬链接,跳过"
|
||||
|
||||
#: src/xz/file_io.c:763
|
||||
#: src/xz/file_io.c:861
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr "空文件名,跳过"
|
||||
|
||||
#: src/xz/file_io.c:817
|
||||
#: src/xz/file_io.c:915
|
||||
#, c-format
|
||||
msgid "Error restoring the status flags to standard input: %s"
|
||||
msgstr "回复标准输入的状态标志时出错:%s"
|
||||
|
||||
#: src/xz/file_io.c:865
|
||||
#: src/xz/file_io.c:963
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard output: %s"
|
||||
msgstr "获取标准输出的文件状态标志时出错:%s"
|
||||
|
||||
#: src/xz/file_io.c:1043
|
||||
#: src/xz/file_io.c:1162
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr "恢复标准输出的 O_APPEND 标志时出错:%s"
|
||||
|
||||
#: src/xz/file_io.c:1055
|
||||
#: src/xz/file_io.c:1174
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s:关闭文件失败:%s"
|
||||
|
||||
#: src/xz/file_io.c:1091 src/xz/file_io.c:1354
|
||||
#: src/xz/file_io.c:1210 src/xz/file_io.c:1472
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr "%s:尝试创建稀疏文件时 seek 失败:%s"
|
||||
|
||||
#: src/xz/file_io.c:1192
|
||||
#: src/xz/file_io.c:1310
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s:读取错误:%s"
|
||||
|
||||
#: src/xz/file_io.c:1222
|
||||
#: src/xz/file_io.c:1340
|
||||
#, c-format
|
||||
msgid "%s: Error seeking the file: %s"
|
||||
msgstr "%s:seek 文件时出错:%s"
|
||||
|
||||
#: src/xz/file_io.c:1246
|
||||
#: src/xz/file_io.c:1364
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr "%s:未预期的文件结束"
|
||||
|
||||
#: src/xz/file_io.c:1305
|
||||
#: src/xz/file_io.c:1423
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s:写入错误:%s"
|
||||
@ -477,63 +529,63 @@ msgstr "%s:过小而不是有效的 .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:730
|
||||
#: src/xz/list.c:741
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr " 流 块 压缩大小 解压大小 比例 校验 文件名"
|
||||
|
||||
#: src/xz/list.c:1025 src/xz/list.c:1203
|
||||
#: src/xz/list.c:1036 src/xz/list.c:1214
|
||||
msgid "Yes"
|
||||
msgstr "是"
|
||||
|
||||
#: src/xz/list.c:1025 src/xz/list.c:1203
|
||||
#: src/xz/list.c:1036 src/xz/list.c:1214
|
||||
msgid "No"
|
||||
msgstr "否"
|
||||
|
||||
#: src/xz/list.c:1027 src/xz/list.c:1205
|
||||
#: src/xz/list.c:1038 src/xz/list.c:1216
|
||||
#, c-format
|
||||
msgid " Minimum XZ Utils version: %s\n"
|
||||
msgstr " 最低 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:1178
|
||||
#: src/xz/list.c:1189
|
||||
#, c-format
|
||||
msgid "%s file\n"
|
||||
msgid_plural "%s files\n"
|
||||
msgstr[0] "%s 文件\n"
|
||||
|
||||
#: src/xz/list.c:1191
|
||||
#: src/xz/list.c:1202
|
||||
msgid "Totals:"
|
||||
msgstr "总计:"
|
||||
|
||||
#: src/xz/list.c:1269
|
||||
#: src/xz/list.c:1280
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr "--list 仅适用于 .xz 文件(--format=xz 或 --format=auto)"
|
||||
|
||||
#: src/xz/list.c:1275
|
||||
#: src/xz/list.c:1286
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr "--list 不支持从标准输入读取"
|
||||
|
||||
#: src/xz/main.c:89
|
||||
#: src/xz/main.c:96
|
||||
#, c-format
|
||||
msgid "%s: Error reading filenames: %s"
|
||||
msgstr "%s:读取文件名列表时出错:%s"
|
||||
|
||||
#: src/xz/main.c:96
|
||||
#: src/xz/main.c:103
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of input when reading filenames"
|
||||
msgstr "%s:读取文件名列表时遇到未预期的输入结束"
|
||||
|
||||
#: src/xz/main.c:120
|
||||
#: src/xz/main.c:127
|
||||
#, c-format
|
||||
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
|
||||
msgstr "%s:读取文件名列表时获得了空字符;您可能想要使用“--files0”而非“--files”?"
|
||||
msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?"
|
||||
msgstr "%s:读取文件名列表时获得了空字符;您可能想要使用 '--files0' 而非 '--files'?"
|
||||
|
||||
#: src/xz/main.c:188
|
||||
#: src/xz/main.c:207
|
||||
msgid "Compression and decompression with --robot are not supported yet."
|
||||
msgstr "尚不支持带 --robot 的压缩和解压缩。"
|
||||
|
||||
#: src/xz/main.c:266
|
||||
#: src/xz/main.c:285
|
||||
msgid "Cannot read data from standard input when reading filenames from standard input"
|
||||
msgstr "无法同时从标准输入读取数据和文件名列表"
|
||||
|
||||
@ -541,68 +593,68 @@ 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:725
|
||||
#: src/xz/message.c:671 src/xz/message.c:726
|
||||
#, c-format
|
||||
msgid "%s: "
|
||||
msgstr "%s:"
|
||||
|
||||
#: src/xz/message.c:797 src/xz/message.c:856
|
||||
#: src/xz/message.c:798 src/xz/message.c:857
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "内部错误(bug)"
|
||||
|
||||
#: src/xz/message.c:804
|
||||
#: src/xz/message.c:805
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "无法建立信号处理器"
|
||||
|
||||
#: src/xz/message.c:813
|
||||
#: src/xz/message.c:814
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "无完整性检查;将不验证文件完整性"
|
||||
|
||||
#: src/xz/message.c:816
|
||||
#: src/xz/message.c:817
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr "不支持的完整性检查类型;将不验证文件完整性"
|
||||
|
||||
#: src/xz/message.c:823
|
||||
#: src/xz/message.c:824
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "达到内存使用限制"
|
||||
|
||||
#: src/xz/message.c:826
|
||||
#: src/xz/message.c:827
|
||||
msgid "File format not recognized"
|
||||
msgstr "无法识别文件格式"
|
||||
|
||||
#: src/xz/message.c:829
|
||||
#: src/xz/message.c:830
|
||||
msgid "Unsupported options"
|
||||
msgstr "不支持的选项"
|
||||
|
||||
#: src/xz/message.c:832
|
||||
#: src/xz/message.c:833
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "压缩数据已损坏"
|
||||
|
||||
#: src/xz/message.c:835
|
||||
#: src/xz/message.c:836
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "输入意外结束"
|
||||
|
||||
#: src/xz/message.c:877
|
||||
#: src/xz/message.c:878
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limiter is disabled."
|
||||
msgstr "需要 %s MiB 的内存空间。限制已禁用。"
|
||||
|
||||
#: src/xz/message.c:905
|
||||
#: src/xz/message.c:906
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "需要 %s MiB 的内存空间。限制为 %s。"
|
||||
|
||||
#: src/xz/message.c:924
|
||||
#: src/xz/message.c:925
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s:过滤器链:%s\n"
|
||||
|
||||
#: src/xz/message.c:935
|
||||
#: src/xz/message.c:936
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "请尝试执行“%s --help”来获取更多信息。"
|
||||
msgid "Try '%s --help' for more information."
|
||||
msgstr "请尝试执行 '%s --help' 来获取更多信息。"
|
||||
|
||||
#: src/xz/message.c:961
|
||||
#: src/xz/message.c:962
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
@ -613,15 +665,15 @@ msgstr ""
|
||||
"使用 .xz 格式压缩或解压缩文件。\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:968
|
||||
#: src/xz/message.c:969
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr "必选参数对长短选项同时适用。\n"
|
||||
|
||||
#: src/xz/message.c:972
|
||||
#: src/xz/message.c:973
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " 操作模式:\n"
|
||||
|
||||
#: src/xz/message.c:975
|
||||
#: src/xz/message.c:976
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
@ -633,7 +685,7 @@ msgstr ""
|
||||
" -t, --test 测试压缩文件完整性\n"
|
||||
" -l, --list 列出 .xz 文件的信息"
|
||||
|
||||
#: src/xz/message.c:981
|
||||
#: src/xz/message.c:982
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
@ -641,7 +693,7 @@ msgstr ""
|
||||
"\n"
|
||||
" 操作修饰符:\n"
|
||||
|
||||
#: src/xz/message.c:984
|
||||
#: src/xz/message.c:985
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
@ -651,16 +703,24 @@ msgstr ""
|
||||
" -f, --force 强制覆写输出文件和(解)压缩链接\n"
|
||||
" -c, --stdout 向标准输出写入,同时不要删除输入文件"
|
||||
|
||||
#: src/xz/message.c:993
|
||||
#: src/xz/message.c:994
|
||||
msgid ""
|
||||
" --single-stream decompress only the first stream, and silently\n"
|
||||
" ignore possible remaining input data"
|
||||
msgstr " --single-stream 仅解压缩第一个流,忽略其后可能继续出现的输入数据"
|
||||
|
||||
#: src/xz/message.c:996
|
||||
#: src/xz/message.c:997
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| " --no-sparse do not create sparse files when decompressing\n"
|
||||
#| " -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
#| " --files[=FILE] read filenames to process from FILE; if FILE is\n"
|
||||
#| " omitted, filenames are read from the standard input;\n"
|
||||
#| " filenames must be terminated with the newline character\n"
|
||||
#| " --files0[=FILE] like --files but use the null character as terminator"
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
" -S, --suffix=.SUF use the suffix '.SUF' on compressed files\n"
|
||||
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
|
||||
" omitted, filenames are read from the standard input;\n"
|
||||
" filenames must be terminated with the newline character\n"
|
||||
@ -672,7 +732,7 @@ msgstr ""
|
||||
" 将从标准输入读取文件名列表;文件名必须使用换行符分隔\n"
|
||||
" --files0[=文件] 类似 --files,但使用空字符进行分隔"
|
||||
|
||||
#: src/xz/message.c:1005
|
||||
#: src/xz/message.c:1006
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
@ -680,12 +740,18 @@ msgstr ""
|
||||
"\n"
|
||||
" 基本文件格式和压缩选项:\n"
|
||||
|
||||
#: src/xz/message.c:1007
|
||||
#: src/xz/message.c:1008
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| " -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
#| " `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
|
||||
#| " -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
#| " `crc32', `crc64' (default), or `sha256'"
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
|
||||
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
" `crc32', `crc64' (default), or `sha256'"
|
||||
" 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'\n"
|
||||
" -C, --check=CHECK integrity check type: 'none' (use with caution),\n"
|
||||
" 'crc32', 'crc64' (default), or 'sha256'"
|
||||
msgstr ""
|
||||
" -F, --format=格式 要编码或解码的文件格式;可能的值包括\n"
|
||||
" “auto”(默认)、“xz”、“lzma”、\n"
|
||||
@ -693,11 +759,11 @@ msgstr ""
|
||||
" -C, --check=类型 完整性检查类型:“none”(请谨慎使用)、\n"
|
||||
" “crc32”、“crc64”(默认)或“sha256”"
|
||||
|
||||
#: src/xz/message.c:1012
|
||||
#: src/xz/message.c:1013
|
||||
msgid " --ignore-check don't verify the integrity check when decompressing"
|
||||
msgstr " --ignore-check 解压缩时不要进行完整性检查验证"
|
||||
|
||||
#: src/xz/message.c:1016
|
||||
#: src/xz/message.c:1017
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
@ -705,7 +771,7 @@ msgstr ""
|
||||
" -0 ... -9 压缩预设等级;默认为 6;使用 7-9 的等级之前,请先考虑\n"
|
||||
" 压缩和解压缩所需的内存用量!(会占用大量内存空间)"
|
||||
|
||||
#: src/xz/message.c:1020
|
||||
#: src/xz/message.c:1021
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
@ -713,15 +779,19 @@ msgstr ""
|
||||
" -e, --extreme 尝试使用更多 CPU 时间来改进压缩比率;\n"
|
||||
" 不会影响解压缩的内存需求量"
|
||||
|
||||
#: src/xz/message.c:1024
|
||||
#: src/xz/message.c:1025
|
||||
#, fuzzy
|
||||
#| 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"
|
||||
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"
|
||||
" -T, --threads=NUM use at most NUM threads; the default is 0 which uses\n"
|
||||
" as many threads as there are processor cores"
|
||||
msgstr ""
|
||||
" -T, --threads=数量 使用最多指定数量的线程;默认值为 1;设置为 0\n"
|
||||
" 可以使用与处理器内核数量相同的线程数"
|
||||
|
||||
#: src/xz/message.c:1029
|
||||
#: src/xz/message.c:1030
|
||||
msgid ""
|
||||
" --block-size=SIZE\n"
|
||||
" start a new .xz block after every SIZE bytes of input;\n"
|
||||
@ -731,17 +801,24 @@ msgstr ""
|
||||
" 输入每读取指定块大小的数据后即开始一个新的 .xz 块;\n"
|
||||
" 使用该选项可以设置多线程压缩中的块大小"
|
||||
|
||||
#: src/xz/message.c:1033
|
||||
#: src/xz/message.c:1034
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| " --block-list=SIZES\n"
|
||||
#| " start a new .xz block after the given comma-separated\n"
|
||||
#| " intervals of uncompressed data"
|
||||
msgid ""
|
||||
" --block-list=SIZES\n"
|
||||
" --block-list=BLOCKS\n"
|
||||
" start a new .xz block after the given comma-separated\n"
|
||||
" intervals of uncompressed data"
|
||||
" intervals of uncompressed data; optionally, specify a\n"
|
||||
" filter chain number (0-9) followed by a ':' before the\n"
|
||||
" uncompressed data size"
|
||||
msgstr ""
|
||||
" --block-list=块大小列表\n"
|
||||
" 在所给出的未压缩数据间隔大小的数据之后开始一个新的\n"
|
||||
" .xz 块(使用逗号分隔)"
|
||||
|
||||
#: src/xz/message.c:1037
|
||||
#: src/xz/message.c:1040
|
||||
msgid ""
|
||||
" --flush-timeout=TIMEOUT\n"
|
||||
" when compressing, if more than TIMEOUT milliseconds has\n"
|
||||
@ -752,7 +829,7 @@ msgstr ""
|
||||
" 进行压缩时,如果从上次刷洗输出之后经过了指定的超时时间\n"
|
||||
" 且读取更多数据会被阻塞,则刷洗输出所有缓冲数据"
|
||||
|
||||
#: src/xz/message.c:1043
|
||||
#: src/xz/message.c:1046
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
@ -771,13 +848,13 @@ msgstr ""
|
||||
" 所指定限制量单位为字节,或以百分号 % 结尾表示内存比例,\n"
|
||||
" 或者指定 0 取软件默认值"
|
||||
|
||||
#: src/xz/message.c:1052
|
||||
#: src/xz/message.c:1055
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
msgstr " --no-adjust 如果压缩设置超出内存用量限制,不调整设置而直接报错"
|
||||
|
||||
#: src/xz/message.c:1058
|
||||
#: src/xz/message.c:1061
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
@ -785,7 +862,27 @@ msgstr ""
|
||||
"\n"
|
||||
" 用于压缩的自定义过滤器链(不使用预设等级时的备选用法):"
|
||||
|
||||
#: src/xz/message.c:1067
|
||||
#: src/xz/message.c:1064
|
||||
msgid ""
|
||||
"\n"
|
||||
" --filters=FILTERS set the filter chain using the liblzma filter string\n"
|
||||
" syntax; use --filters-help for more information"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1070
|
||||
msgid ""
|
||||
" --filters1=FILTERS ... --filters9=FILTERS\n"
|
||||
" set additional filter chains using the liblzma filter\n"
|
||||
" string syntax to use with --block-list"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1076
|
||||
msgid ""
|
||||
" --filters-help display more information about the liblzma filter string\n"
|
||||
" syntax and exit."
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1087
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
@ -814,7 +911,19 @@ msgstr ""
|
||||
" (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=数字 最大搜索深度; 0=自动(默认)"
|
||||
|
||||
#: src/xz/message.c:1082
|
||||
#: src/xz/message.c:1102
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "\n"
|
||||
#| " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
#| " --arm[=OPTS] ARM BCJ filter\n"
|
||||
#| " --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
|
||||
#| " --arm64[=OPTS] ARM64 BCJ filter\n"
|
||||
#| " --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
|
||||
#| " --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
|
||||
#| " --sparc[=OPTS] SPARC BCJ filter\n"
|
||||
#| " Valid OPTS for all BCJ filters:\n"
|
||||
#| " start=NUM start offset for conversions (default=0)"
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@ -824,6 +933,7 @@ msgid ""
|
||||
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
|
||||
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
|
||||
" --sparc[=OPTS] SPARC BCJ filter\n"
|
||||
" --riscv[=OPTS] RISC-V BCJ filter\n"
|
||||
" Valid OPTS for all BCJ filters:\n"
|
||||
" start=NUM start offset for conversions (default=0)"
|
||||
msgstr ""
|
||||
@ -838,7 +948,7 @@ msgstr ""
|
||||
" 所有过滤器可用选项:\n"
|
||||
" start=数字 转换的起始偏移量(默认=0)"
|
||||
|
||||
#: src/xz/message.c:1095
|
||||
#: src/xz/message.c:1116
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
@ -849,7 +959,7 @@ msgstr ""
|
||||
" --delta[=选项] 增量过滤器;有效选项(有效值;默认值):\n"
|
||||
" dist=NUM 相减的字节之间的距离 (1-256; 1)"
|
||||
|
||||
#: src/xz/message.c:1103
|
||||
#: src/xz/message.c:1124
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
@ -857,7 +967,7 @@ msgstr ""
|
||||
"\n"
|
||||
" 其它选项:\n"
|
||||
|
||||
#: src/xz/message.c:1106
|
||||
#: src/xz/message.c:1127
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
@ -865,21 +975,21 @@ msgstr ""
|
||||
" -q, --quiet 不显示警告信息;指定两次可不显示错误信息\n"
|
||||
" -v, --verbose 输出详细信息;指定两次可以输出更详细的信息"
|
||||
|
||||
#: src/xz/message.c:1111
|
||||
#: src/xz/message.c:1132
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn 使得警告信息不影响程序退出返回值"
|
||||
|
||||
#: src/xz/message.c:1113
|
||||
#: src/xz/message.c:1134
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr " --robot 使用机器可解析的信息(对于脚本有用)"
|
||||
|
||||
#: src/xz/message.c:1116
|
||||
#: src/xz/message.c:1137
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
msgstr " --info-memory 显示 RAM 总量和当前配置的内存用量限制,然后退出"
|
||||
|
||||
#: src/xz/message.c:1119
|
||||
#: src/xz/message.c:1140
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
@ -887,7 +997,7 @@ msgstr ""
|
||||
" -h, --help 显示短帮助信息(仅列出基本选项)\n"
|
||||
" -H, --long-help 显示本长帮助信息"
|
||||
|
||||
#: src/xz/message.c:1123
|
||||
#: src/xz/message.c:1144
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
@ -895,11 +1005,11 @@ msgstr ""
|
||||
" -h, --help 显示本短帮助信息并退出\n"
|
||||
" -H, --long-help 显示长帮助信息(同时列出高级选项)"
|
||||
|
||||
#: src/xz/message.c:1128
|
||||
#: src/xz/message.c:1149
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version 显示软件版本号并退出"
|
||||
|
||||
#: src/xz/message.c:1130
|
||||
#: src/xz/message.c:1151
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
@ -911,7 +1021,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:1136
|
||||
#: src/xz/message.c:1157
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
@ -919,19 +1029,33 @@ msgstr ""
|
||||
"请使用中文向 TP 简体中文翻译团队 <i18n-zh@googlegroups.com>\n"
|
||||
"报告软件的简体中文翻译错误。\n"
|
||||
|
||||
#: src/xz/message.c:1138
|
||||
#: src/xz/message.c:1159
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "%s 主页:<%s>\n"
|
||||
|
||||
#: src/xz/message.c:1142
|
||||
#: src/xz/message.c:1163
|
||||
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
|
||||
msgstr "这是开发版本,不适用于生产环境使用。"
|
||||
|
||||
#: src/xz/message.c:1180
|
||||
msgid ""
|
||||
"Filter chains are set using the --filters=FILTERS or\n"
|
||||
"--filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain\n"
|
||||
"can be separated by spaces or '--'. Alternatively a preset <0-9>[e] can be\n"
|
||||
"specified instead of a filter chain.\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1186
|
||||
#, fuzzy
|
||||
#| msgid "Unsupported filter chain or filter options"
|
||||
msgid "The supported filters and their options are:"
|
||||
msgstr "不支持的过滤器链或过滤器选项"
|
||||
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
msgstr "%s:选项必须按照“名称=值”的格式成对出现,使用半角逗号分隔"
|
||||
msgid "%s: Options must be 'name=value' pairs separated with commas"
|
||||
msgstr "%s:选项必须按照 '名称=值' 的格式成对出现,使用半角逗号分隔"
|
||||
|
||||
#: src/xz/options.c:93
|
||||
#, c-format
|
||||
@ -943,59 +1067,57 @@ msgstr "%s:无效的选项名称"
|
||||
msgid "%s: Invalid option value"
|
||||
msgstr "%s:无效的选项值"
|
||||
|
||||
#: src/xz/options.c:247
|
||||
#: src/xz/options.c:248
|
||||
#, c-format
|
||||
msgid "Unsupported LZMA1/LZMA2 preset: %s"
|
||||
msgstr "不支持的 LZMA1/LZMA2 预设等级:%s"
|
||||
|
||||
#: src/xz/options.c:355
|
||||
#: src/xz/options.c:356
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr "lc 和 lp 的和必须不大于 4"
|
||||
|
||||
#: src/xz/suffix.c:137 src/xz/suffix.c:268
|
||||
#, c-format
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s:在启用 --format-raw 选项时,必须指定 --suffix=.SUF 获知写入至标准输出"
|
||||
|
||||
#: src/xz/suffix.c:168
|
||||
#: src/xz/suffix.c:166
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s:文件名有未知后缀,跳过"
|
||||
|
||||
#: src/xz/suffix.c:189
|
||||
#: src/xz/suffix.c:187
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s:文件已有“%s”后缀名,跳过"
|
||||
msgid "%s: File already has '%s' suffix, skipping"
|
||||
msgstr "%s:文件已有 '%s' 后缀名,跳过"
|
||||
|
||||
#: src/xz/suffix.c:405
|
||||
#: src/xz/suffix.c:394
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s:无效的文件名后缀"
|
||||
|
||||
#: src/xz/util.c:71
|
||||
#: src/xz/util.c:107
|
||||
#, c-format
|
||||
msgid "%s: Value is not a non-negative decimal integer"
|
||||
msgstr "%s:值不是非负十进制整数"
|
||||
|
||||
#: src/xz/util.c:113
|
||||
#: src/xz/util.c:149
|
||||
#, c-format
|
||||
msgid "%s: Invalid multiplier suffix"
|
||||
msgstr "%s:无效的乘数后缀"
|
||||
|
||||
#: src/xz/util.c:115
|
||||
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
#: src/xz/util.c:151
|
||||
#, fuzzy
|
||||
#| msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)."
|
||||
msgstr "有效的后缀包括“KiB”(2^10)、“MiB”(2^20)和“GiB”(2^30)。"
|
||||
|
||||
#: src/xz/util.c:132
|
||||
#, c-format
|
||||
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
#: src/xz/util.c:168
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgid "Value of the option '%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr "选项“%s”的值必须位于 [%<PRIu64>, %<PRIu64>] 范围内"
|
||||
|
||||
#: src/xz/util.c:269
|
||||
#: src/xz/util.c:291
|
||||
msgid "Compressed data cannot be read from a terminal"
|
||||
msgstr "压缩数据不能从终端读取"
|
||||
|
||||
#: src/xz/util.c:282
|
||||
#: src/xz/util.c:304
|
||||
msgid "Compressed data cannot be written to a terminal"
|
||||
msgstr "压缩数据不能向终端写入"
|
||||
|
||||
@ -1007,7 +1129,6 @@ msgstr "写入标准输出失败"
|
||||
msgid "Unknown error"
|
||||
msgstr "未知错误"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
#~ msgstr "所选中的匹配搜索器(match finder)至少需要 nice=%<PRIu32>"
|
||||
|
||||
|
254
po/zh_TW.po
254
po/zh_TW.po
@ -1,22 +1,22 @@
|
||||
# Chinese translations for xz package.
|
||||
# This file is put in the public domain.
|
||||
#
|
||||
# pan93412 <pan93412@gmail.com>, 2019.
|
||||
# Yi-Jyun Pan <pan93412@gmail.com>, 2019, 2023
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz 5.2.4\n"
|
||||
"Project-Id-Version: xz 5.4.3\n"
|
||||
"Report-Msgid-Bugs-To: xz@tukaani.org\n"
|
||||
"POT-Creation-Date: 2023-01-11 19:01+0200\n"
|
||||
"PO-Revision-Date: 2019-04-23 22:00+0800\n"
|
||||
"Last-Translator: pan93412 <pan93412@gmail.com>\n"
|
||||
"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
|
||||
"POT-Creation-Date: 2023-05-04 22:32+0800\n"
|
||||
"PO-Revision-Date: 2023-07-08 23:05+0800\n"
|
||||
"Last-Translator: Yi-Jyun Pan <pan93412@gmail.com>\n"
|
||||
"Language-Team: Chinese (traditional) <zh-l10n@lists.linux.org.tw>\n"
|
||||
"Language: zh_TW\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 2.2.1\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"X-Generator: Poedit 3.3.2\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
|
||||
#: src/xz/args.c:77
|
||||
@ -62,7 +62,11 @@ msgstr "已在編譯時停用解壓縮支援"
|
||||
|
||||
#: src/xz/args.c:701
|
||||
msgid "Compression of lzip files (.lz) is not supported"
|
||||
msgstr ""
|
||||
msgstr "不支援壓縮為 lzip 檔案 (.lz)"
|
||||
|
||||
#: src/xz/args.c:732
|
||||
msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "搭配 --format=raw 時,除非寫入標準輸出,否則需要傳入 --suffix=.SUF"
|
||||
|
||||
#: src/xz/coder.c:115
|
||||
msgid "Maximum number of filters is four"
|
||||
@ -111,21 +115,19 @@ msgid "Decompression will need %s MiB of memory."
|
||||
msgstr "解壓縮將需要 %s MiB 的記憶體。"
|
||||
|
||||
#: src/xz/coder.c:309
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
#, c-format
|
||||
msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "已將 %s 個執行緒調整至 %s,以不超過記憶體用量的 %s MiB 限制"
|
||||
msgstr "已將執行緒數量從 %s 個減少至 %s 個,以不超過記憶體用量的 %s MiB 限制"
|
||||
|
||||
#: src/xz/coder.c:329
|
||||
#, c-format
|
||||
msgid "Reduced the number of threads from %s to one. The automatic memory usage limit of %s MiB is still being exceeded. %s MiB of memory is required. Continuing anyway."
|
||||
msgstr ""
|
||||
msgstr "已將執行緒數量從 %s 減少至一個,但依然超出 %s MiB 的自動記憶體用量限制。需要 %s MiB 的記憶體。依然繼續執行。"
|
||||
|
||||
#: src/xz/coder.c:356
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
|
||||
#, c-format
|
||||
msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "已將 %s 個執行緒調整至 %s,以不超過記憶體用量的 %s MiB 限制"
|
||||
msgstr "正在切換至單執行緒模式,以免超出 %s MiB 的記憶體用量限制"
|
||||
|
||||
#: src/xz/coder.c:411
|
||||
#, c-format
|
||||
@ -137,11 +139,11 @@ msgstr "已將 LZMA%c 的字典大小從 %s MiB 調整至 %s MiB,以不超過
|
||||
msgid "Error creating a pipe: %s"
|
||||
msgstr "建立管線時發生錯誤:%s"
|
||||
|
||||
#: src/xz/file_io.c:235
|
||||
#: src/xz/file_io.c:252
|
||||
msgid "Failed to enable the sandbox"
|
||||
msgstr "無法啟用沙盒"
|
||||
|
||||
#: src/xz/file_io.c:277
|
||||
#: src/xz/file_io.c:294
|
||||
#, c-format
|
||||
msgid "%s: poll() failed: %s"
|
||||
msgstr "%s:poll() 失敗:%s"
|
||||
@ -156,111 +158,111 @@ msgstr "%s:poll() 失敗:%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:344
|
||||
#: src/xz/file_io.c:361
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr "%s:檔案似乎已經遷移,不移除"
|
||||
|
||||
#: src/xz/file_io.c:351 src/xz/file_io.c:907
|
||||
#: src/xz/file_io.c:368 src/xz/file_io.c:924
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr "%s:無法移除:%s"
|
||||
|
||||
#: src/xz/file_io.c:377
|
||||
#: src/xz/file_io.c:394
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr "%s:無法設定檔案所有者:%s"
|
||||
|
||||
#: src/xz/file_io.c:390
|
||||
#: src/xz/file_io.c:407
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr "%s:無法設定檔案群組:%s"
|
||||
|
||||
#: src/xz/file_io.c:409
|
||||
#: src/xz/file_io.c:426
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr "%s:無法設定檔案權限:%s"
|
||||
|
||||
#: src/xz/file_io.c:535
|
||||
#: src/xz/file_io.c:552
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard input: %s"
|
||||
msgstr "從標準輸入取得檔案狀態旗標時發生錯誤:%s"
|
||||
|
||||
#: src/xz/file_io.c:593 src/xz/file_io.c:655
|
||||
#: src/xz/file_io.c:610 src/xz/file_io.c:672
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr "%s:是個符號連結,跳過"
|
||||
|
||||
#: src/xz/file_io.c:684
|
||||
#: src/xz/file_io.c:701
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr "%s:是個目錄,跳過"
|
||||
|
||||
#: src/xz/file_io.c:690
|
||||
#: src/xz/file_io.c:707
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr "%s:不是一般檔案,跳過"
|
||||
|
||||
#: src/xz/file_io.c:707
|
||||
#: src/xz/file_io.c:724
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr "%s:檔案已設定 setuid 或 setgid 位元,跳過"
|
||||
|
||||
#: src/xz/file_io.c:714
|
||||
#: src/xz/file_io.c:731
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr "%s:檔案已設定黏性位元(sticky bit),跳過"
|
||||
|
||||
#: src/xz/file_io.c:721
|
||||
#: src/xz/file_io.c:738
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr "%s:輸入檔有超過一個實際連結 (hard link),跳過"
|
||||
|
||||
#: src/xz/file_io.c:763
|
||||
#: src/xz/file_io.c:780
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr "空檔名,跳過"
|
||||
|
||||
#: src/xz/file_io.c:817
|
||||
#: src/xz/file_io.c:834
|
||||
#, c-format
|
||||
msgid "Error restoring the status flags to standard input: %s"
|
||||
msgstr "將狀態旗標還原到標準輸入時發生錯誤:%s"
|
||||
|
||||
#: src/xz/file_io.c:865
|
||||
#: src/xz/file_io.c:882
|
||||
#, c-format
|
||||
msgid "Error getting the file status flags from standard output: %s"
|
||||
msgstr "從標準輸出取得檔案狀態旗標時發生錯誤:%s"
|
||||
|
||||
#: src/xz/file_io.c:1043
|
||||
#: src/xz/file_io.c:1060
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr "將 O_APPEND 旗標還原到標準輸出時發生錯誤:%s"
|
||||
|
||||
#: src/xz/file_io.c:1055
|
||||
#: src/xz/file_io.c:1072
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr "%s:關閉檔案失敗:%s"
|
||||
|
||||
#: src/xz/file_io.c:1091 src/xz/file_io.c:1354
|
||||
#: src/xz/file_io.c:1108 src/xz/file_io.c:1371
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr "%s:嘗試建立疏鬆檔案時發生搜尋失敗:%s"
|
||||
|
||||
#: src/xz/file_io.c:1192
|
||||
#: src/xz/file_io.c:1209
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr "%s:讀取時發生錯誤:%s"
|
||||
|
||||
#: src/xz/file_io.c:1222
|
||||
#: src/xz/file_io.c:1239
|
||||
#, c-format
|
||||
msgid "%s: Error seeking the file: %s"
|
||||
msgstr "%s:搜尋檔案時發生錯誤:%s"
|
||||
|
||||
#: src/xz/file_io.c:1246
|
||||
#: src/xz/file_io.c:1263
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr "%s:非期望的檔案結尾"
|
||||
|
||||
#: src/xz/file_io.c:1305
|
||||
#: src/xz/file_io.c:1322
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr "%s:寫入時發生錯誤:%s"
|
||||
@ -270,160 +272,140 @@ msgid "Disabled"
|
||||
msgstr "已停用"
|
||||
|
||||
#: src/xz/hardware.c:269
|
||||
#, fuzzy
|
||||
#| msgid "Total amount of physical memory (RAM): "
|
||||
msgid "Amount of physical memory (RAM):"
|
||||
msgstr "實體記憶體 (RAM) 總量:"
|
||||
msgstr "實體記憶體 (RAM) 數量:"
|
||||
|
||||
#: src/xz/hardware.c:270
|
||||
msgid "Number of processor threads:"
|
||||
msgstr ""
|
||||
msgstr "處理器執行緒的數量:"
|
||||
|
||||
#: src/xz/hardware.c:271
|
||||
msgid "Compression:"
|
||||
msgstr ""
|
||||
msgstr "壓縮:"
|
||||
|
||||
#: src/xz/hardware.c:272
|
||||
msgid "Decompression:"
|
||||
msgstr ""
|
||||
msgstr "解壓縮:"
|
||||
|
||||
#: src/xz/hardware.c:273
|
||||
#, fuzzy
|
||||
#| msgid "Memory usage limit for decompression: "
|
||||
msgid "Multi-threaded decompression:"
|
||||
msgstr "解壓縮記憶體限制: "
|
||||
msgstr "多執行緒解壓縮:"
|
||||
|
||||
#: src/xz/hardware.c:274
|
||||
msgid "Default for -T0:"
|
||||
msgstr ""
|
||||
msgstr "-T0 的預設值:"
|
||||
|
||||
#: src/xz/hardware.c:292
|
||||
msgid "Hardware information:"
|
||||
msgstr ""
|
||||
msgstr "硬體資訊:"
|
||||
|
||||
#: src/xz/hardware.c:299
|
||||
#, fuzzy
|
||||
#| msgid "Memory usage limit reached"
|
||||
msgid "Memory usage limits:"
|
||||
msgstr "達到記憶體用量上限"
|
||||
msgstr "記憶體用量上限:"
|
||||
|
||||
#: src/xz/list.c:68
|
||||
msgid "Streams:"
|
||||
msgstr ""
|
||||
msgstr "串流:"
|
||||
|
||||
#: src/xz/list.c:69
|
||||
msgid "Blocks:"
|
||||
msgstr ""
|
||||
msgstr "區塊:"
|
||||
|
||||
#: src/xz/list.c:70
|
||||
#, fuzzy
|
||||
#| msgid " Compressed size: %s\n"
|
||||
msgid "Compressed size:"
|
||||
msgstr " 壓縮大小: %s\n"
|
||||
msgstr "壓縮後大小:"
|
||||
|
||||
#: src/xz/list.c:71
|
||||
#, fuzzy
|
||||
#| msgid " Uncompressed size: %s\n"
|
||||
msgid "Uncompressed size:"
|
||||
msgstr " 未壓縮大小: %s\n"
|
||||
msgstr "壓縮前大小:"
|
||||
|
||||
#: src/xz/list.c:72
|
||||
msgid "Ratio:"
|
||||
msgstr ""
|
||||
msgstr "壓縮比:"
|
||||
|
||||
#: src/xz/list.c:73
|
||||
msgid "Check:"
|
||||
msgstr ""
|
||||
msgstr "檢查:"
|
||||
|
||||
#: src/xz/list.c:74
|
||||
#, fuzzy
|
||||
#| msgid " Stream padding: %s\n"
|
||||
msgid "Stream Padding:"
|
||||
msgstr " 串流填充: %s\n"
|
||||
msgstr "串流填充:"
|
||||
|
||||
#: src/xz/list.c:75
|
||||
#, fuzzy
|
||||
#| msgid " Memory needed: %s MiB\n"
|
||||
msgid "Memory needed:"
|
||||
msgstr " 所需記憶體量: %s MiB\n"
|
||||
msgstr "所需記憶體:"
|
||||
|
||||
#: src/xz/list.c:76
|
||||
#, fuzzy
|
||||
#| msgid " Sizes in headers: %s\n"
|
||||
msgid "Sizes in headers:"
|
||||
msgstr " 檔頭中標示大小: %s\n"
|
||||
msgstr "檔頭中標示大小:"
|
||||
|
||||
#: src/xz/list.c:79
|
||||
#, fuzzy
|
||||
#| msgid " Number of files: %s\n"
|
||||
msgid "Number of files:"
|
||||
msgstr " 檔案數: %s\n"
|
||||
msgstr "檔案數:"
|
||||
|
||||
#: src/xz/list.c:122
|
||||
msgid "Stream"
|
||||
msgstr ""
|
||||
msgstr "串流"
|
||||
|
||||
#: src/xz/list.c:123
|
||||
msgid "Block"
|
||||
msgstr ""
|
||||
msgstr "區塊"
|
||||
|
||||
#: src/xz/list.c:124
|
||||
msgid "Blocks"
|
||||
msgstr ""
|
||||
msgstr "區塊"
|
||||
|
||||
#: src/xz/list.c:125
|
||||
msgid "CompOffset"
|
||||
msgstr ""
|
||||
msgstr "壓縮偏移"
|
||||
|
||||
#: src/xz/list.c:126
|
||||
msgid "UncompOffset"
|
||||
msgstr ""
|
||||
msgstr "未壓縮偏移"
|
||||
|
||||
#: src/xz/list.c:127
|
||||
msgid "CompSize"
|
||||
msgstr ""
|
||||
msgstr "壓縮大小"
|
||||
|
||||
#: src/xz/list.c:128
|
||||
msgid "UncompSize"
|
||||
msgstr ""
|
||||
msgstr "未壓縮大小"
|
||||
|
||||
#: src/xz/list.c:129
|
||||
#, fuzzy
|
||||
#| msgid "Totals:"
|
||||
msgid "TotalSize"
|
||||
msgstr "總計:"
|
||||
msgstr "總計大小"
|
||||
|
||||
#: src/xz/list.c:130
|
||||
msgid "Ratio"
|
||||
msgstr ""
|
||||
msgstr "比率"
|
||||
|
||||
#: src/xz/list.c:131
|
||||
msgid "Check"
|
||||
msgstr ""
|
||||
msgstr "檢查"
|
||||
|
||||
#: src/xz/list.c:132
|
||||
msgid "CheckVal"
|
||||
msgstr ""
|
||||
msgstr "檢查值"
|
||||
|
||||
#: src/xz/list.c:133
|
||||
msgid "Padding"
|
||||
msgstr ""
|
||||
msgstr "填充"
|
||||
|
||||
#: src/xz/list.c:134
|
||||
msgid "Header"
|
||||
msgstr ""
|
||||
msgstr "檔頭"
|
||||
|
||||
#: src/xz/list.c:135
|
||||
msgid "Flags"
|
||||
msgstr ""
|
||||
msgstr "旗標"
|
||||
|
||||
#: src/xz/list.c:136
|
||||
msgid "MemUsage"
|
||||
msgstr ""
|
||||
msgstr "Mem用量"
|
||||
|
||||
#: src/xz/list.c:137
|
||||
msgid "Filters"
|
||||
msgstr ""
|
||||
msgstr "篩選器"
|
||||
|
||||
#. TRANSLATORS: Indicates that there is no integrity check.
|
||||
#. This string is used in tables. In older xz version this
|
||||
@ -501,7 +483,7 @@ msgstr "%s:因過小而不認為是個有效 .xz 檔"
|
||||
#. use two lines here. Test with "xz -l foo.xz".
|
||||
#: src/xz/list.c:730
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr " 串流 區塊 已壓縮 未壓縮 比例 檢驗碼 檔名"
|
||||
msgstr " 串流 區塊 已壓縮 未壓縮 比例 檢驗碼 檔名"
|
||||
|
||||
#: src/xz/list.c:1025 src/xz/list.c:1203
|
||||
msgid "Yes"
|
||||
@ -514,7 +496,7 @@ msgstr "否"
|
||||
#: src/xz/list.c:1027 src/xz/list.c:1205
|
||||
#, c-format
|
||||
msgid " Minimum XZ Utils version: %s\n"
|
||||
msgstr " 最小 XZ 工具程式版本: %s\n"
|
||||
msgstr " 最小 XZ 工具程式版本: %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".
|
||||
@ -705,12 +687,6 @@ msgstr ""
|
||||
" 基本檔案格式與壓縮選項:\n"
|
||||
|
||||
#: src/xz/message.c:1007
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| " -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
#| " `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
#| " -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
#| " `crc32', `crc64' (default), or `sha256'"
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
|
||||
@ -718,9 +694,9 @@ msgid ""
|
||||
" `crc32', `crc64' (default), or `sha256'"
|
||||
msgstr ""
|
||||
" -F, --format=格式 用於編碼或解碼的檔案格式;可用的值有:\n"
|
||||
" 「auto」(預設)、「xz」、「lzma」及「raw」\n"
|
||||
" -C, --check=檢查碼 完整性檢查類型:「none」(請小心使用)、「crc32」、\n"
|
||||
" 「crc64」(預設值)或「sha256」"
|
||||
" “auto”(預設)、“xz”、“lzma”、“lzip” 及 “raw”\n"
|
||||
" -C, --check=檢查碼 完整性檢查類型:“none”(謹慎使用)、“crc32”、\n"
|
||||
" “crc64”(預設值)或“sha256”"
|
||||
|
||||
#: src/xz/message.c:1012
|
||||
msgid " --ignore-check don't verify the integrity check when decompressing"
|
||||
@ -756,8 +732,8 @@ msgid ""
|
||||
" 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=大小\n"
|
||||
" 輸入每 <大小> 位元組後,開始一個新 .xz 區塊;\n"
|
||||
" --block-size=SIZE\n"
|
||||
" 輸入每 SIZE 位元組後,開始一個新 .xz 區塊;\n"
|
||||
" 使用此功能以設定多執行緒壓縮的區塊大小"
|
||||
|
||||
#: src/xz/message.c:1033
|
||||
@ -766,6 +742,9 @@ msgid ""
|
||||
" start a new .xz block after the given comma-separated\n"
|
||||
" intervals of uncompressed data"
|
||||
msgstr ""
|
||||
" --block-list=SIZES\n"
|
||||
" 在指定以逗號隔開的未壓縮資料間隔之後\n"
|
||||
" 開始新的 .xz 區塊"
|
||||
|
||||
#: src/xz/message.c:1037
|
||||
msgid ""
|
||||
@ -774,15 +753,12 @@ msgid ""
|
||||
" passed since the previous flush and reading more input\n"
|
||||
" would block, all pending data is flushed out"
|
||||
msgstr ""
|
||||
" --flush-timeout=TIMEOUT\n"
|
||||
" 壓縮時,倘若繼上次排清 (flush) 已經超過 TIMEOUT 毫秒\n"
|
||||
" 而且讀入更多輸入會阻塞,則所有待排清的資料都將排清"
|
||||
|
||||
#: src/xz/message.c:1043
|
||||
#, fuzzy, no-c-format
|
||||
#| msgid ""
|
||||
#| " --memlimit-compress=LIMIT\n"
|
||||
#| " --memlimit-decompress=LIMIT\n"
|
||||
#| " -M, --memlimit=LIMIT\n"
|
||||
#| " set memory usage limit for compression, decompression,\n"
|
||||
#| " or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
@ -792,11 +768,13 @@ msgid ""
|
||||
" threaded decompression, or all of these; LIMIT is in\n"
|
||||
" bytes, % of RAM, or 0 for defaults"
|
||||
msgstr ""
|
||||
" --memlimit-compress=限制\n"
|
||||
" --memlimit-decompress=限制\n"
|
||||
" -M, --memlimit=限制\n"
|
||||
" 限制壓縮、解壓縮或兩者的記憶體用量上限;\n"
|
||||
" <限制> 可以是位元組、記憶體百分比 (%)、或 0(預設值)"
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" --memlimit-mt-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" 限制壓縮、解壓縮、多執行緒解壓縮或以上全部的記憶體\n"
|
||||
" 用量上限。LIMIT 得是位元組、記憶體百分比 (%),或 0\n"
|
||||
" (預設值)"
|
||||
|
||||
#: src/xz/message.c:1052
|
||||
msgid ""
|
||||
@ -843,17 +821,6 @@ msgstr ""
|
||||
" depth=NUM 最大搜尋深度;0=自動(預設)"
|
||||
|
||||
#: src/xz/message.c:1082
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "\n"
|
||||
#| " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
#| " --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
|
||||
#| " --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
|
||||
#| " --arm[=OPTS] ARM BCJ filter (little endian only)\n"
|
||||
#| " --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
|
||||
#| " --sparc[=OPTS] SPARC BCJ filter\n"
|
||||
#| " Valid OPTS for all BCJ filters:\n"
|
||||
#| " start=NUM start offset for conversions (default=0)"
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@ -868,10 +835,11 @@ msgid ""
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ 篩選器 (32 位元和 64 位元)\n"
|
||||
" --arm[=OPTS] ARM BCJ 篩選器\n"
|
||||
" --armthumb[=OPTS] ARM-Thumb BCJ 篩選器\n"
|
||||
" --arm64[=OPTS] ARM64 BCJ 篩選器\n"
|
||||
" --powerpc[=OPTS] PowerPC BCJ 篩選器(僅大端序)\n"
|
||||
" --ia64[=OPTS] IA-64 (Itanium) BCJ 篩選器\n"
|
||||
" --arm[=OPTS] ARM BCJ 篩選器(僅小端序)\n"
|
||||
" --armthumb[=OPTS] ARM-Thumb BCJ 篩選器(僅小端序)\n"
|
||||
" --sparc[=OPTS] SPARC BCJ 篩選器\n"
|
||||
" 所有 BCJ 篩選器可用的 OPTS:\n"
|
||||
" start=NUM 轉換起始位移(預設值=0)"
|
||||
@ -883,6 +851,10 @@ msgid ""
|
||||
" dist=NUM distance between bytes being subtracted\n"
|
||||
" from each other (1-256; 1)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --delta[=OPTS] 增量篩選器 (有效值; 預設值):\n"
|
||||
" dist=NUM 相減的位元組之間的距離\n"
|
||||
" (1-256; 1)"
|
||||
|
||||
#: src/xz/message.c:1103
|
||||
msgid ""
|
||||
@ -984,22 +956,17 @@ msgstr "不支援的 LZMA1/LZMA2 設定檔:%s"
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr "lc 和 lp 的總和不能超過 4"
|
||||
|
||||
#: src/xz/suffix.c:137 src/xz/suffix.c:268
|
||||
#, c-format
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s:搭配 --format=raw 時,除非寫入標準輸出,否則需要 --suffix=.SUF"
|
||||
|
||||
#: src/xz/suffix.c:168
|
||||
#: src/xz/suffix.c:160
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr "%s:檔名有未知後綴,跳過"
|
||||
|
||||
#: src/xz/suffix.c:189
|
||||
#: src/xz/suffix.c:181
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr "%s:檔案已有「%s」後綴,跳過"
|
||||
|
||||
#: src/xz/suffix.c:405
|
||||
#: src/xz/suffix.c:388
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr "%s:檔名後綴無效"
|
||||
@ -1048,19 +1015,15 @@ msgstr "未知錯誤"
|
||||
#~ msgid "Memory usage limit for compression: "
|
||||
#~ msgstr "壓縮記憶體限制: "
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Streams: %s\n"
|
||||
#~ msgstr " 串流: %s\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Blocks: %s\n"
|
||||
#~ msgstr " 區塊: %s\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Ratio: %s\n"
|
||||
#~ msgstr " 壓縮比: %s\n"
|
||||
|
||||
#, c-format
|
||||
#~ msgid " Check: %s\n"
|
||||
#~ msgstr " 檢驗碼: %s\n"
|
||||
|
||||
@ -1073,7 +1036,6 @@ msgstr "未知錯誤"
|
||||
#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
|
||||
|
||||
# 下方的文字因排版有一些障礙,因此暫時不理他。
|
||||
#, c-format
|
||||
#~ msgid ""
|
||||
#~ " Blocks:\n"
|
||||
#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
|
||||
@ -1082,10 +1044,8 @@ msgstr "未知錯誤"
|
||||
#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
|
||||
|
||||
# 下方的文字因排版有一些障礙,因此暫時不理他。
|
||||
#, c-format
|
||||
#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
#~ msgstr " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
#~ msgstr "選取的符合搜尋工具需要至少 nice=%<PRIu32>"
|
||||
|
1
po4a/.gitignore
vendored
1
po4a/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/man
|
||||
/xz-man.pot
|
||||
/*.po.authors
|
||||
|
2154
po4a/de.po
2154
po4a/de.po
File diff suppressed because it is too large
Load Diff
3095
po4a/fr.po
3095
po4a/fr.po
File diff suppressed because it is too large
Load Diff
4962
po4a/ko.po
4962
po4a/ko.po
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,16 @@
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
# To add a new language, add it to po4a_langs and run "update-po"
|
||||
# to get a new .po file. After translating the .po file, run
|
||||
# "update-po" again to generate the translated man pages.
|
||||
|
||||
[po4a_langs] de fr ro uk ko
|
||||
[po4a_langs] de fr ko pt_BR ro uk
|
||||
[po4a_paths] xz-man.pot $lang:$lang.po
|
||||
|
||||
[type: man] ../src/xz/xz.1 $lang:man/$lang/xz.1
|
||||
[type: man] ../src/xzdec/xzdec.1 $lang:man/$lang/xzdec.1
|
||||
[type: man] ../src/lzmainfo/lzmainfo.1 $lang:man/$lang/lzmainfo.1
|
||||
[type: man] ../src/scripts/xzdiff.1 $lang:man/$lang/xzdiff.1
|
||||
[type: man] ../src/scripts/xzgrep.1 $lang:man/$lang/xzgrep.1
|
||||
[type: man] ../src/scripts/xzless.1 $lang:man/$lang/xzless.1
|
||||
[type: man] ../src/scripts/xzmore.1 $lang:man/$lang/xzmore.1
|
||||
[type: man] ../src/xz/xz.1 $lang:man/$lang/xz.1 add_$lang:?$lang.po.authors
|
||||
[type: man] ../src/xzdec/xzdec.1 $lang:man/$lang/xzdec.1 add_$lang:?$lang.po.authors
|
||||
[type: man] ../src/lzmainfo/lzmainfo.1 $lang:man/$lang/lzmainfo.1 add_$lang:?$lang.po.authors
|
||||
[type: man] ../src/scripts/xzdiff.1 $lang:man/$lang/xzdiff.1 add_$lang:?$lang.po.authors
|
||||
[type: man] ../src/scripts/xzgrep.1 $lang:man/$lang/xzgrep.1 add_$lang:?$lang.po.authors
|
||||
[type: man] ../src/scripts/xzless.1 $lang:man/$lang/xzless.1 add_$lang:?$lang.po.authors
|
||||
[type: man] ../src/scripts/xzmore.1 $lang:man/$lang/xzmore.1 add_$lang:?$lang.po.authors
|
||||
|
5749
po4a/pt_BR.po
Normal file
5749
po4a/pt_BR.po
Normal file
File diff suppressed because it is too large
Load Diff
2145
po4a/ro.po
2145
po4a/ro.po
File diff suppressed because it is too large
Load Diff
2118
po4a/uk.po
2118
po4a/uk.po
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# Updates xz-man.pot and the *.po files, and generates translated man pages.
|
||||
@ -10,9 +11,6 @@
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
if type po4a > /dev/null 2>&1; then
|
||||
@ -26,13 +24,32 @@ fi
|
||||
if test ! -f po4a.conf; then
|
||||
cd `dirname "$0"` || exit 1
|
||||
if test ! -f po4a.conf; then
|
||||
echo "update-po: Error: Cannot find po4a.conf." >&2
|
||||
echo "po4a/update-po: Error: Cannot find po4a.conf." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
PACKAGE_VERSION=`cd .. && sh build-aux/version.sh` || exit 1
|
||||
|
||||
# Put the author info from the .po files into the header comment of
|
||||
# the generated man pages.
|
||||
for FILE in *.po
|
||||
do
|
||||
printf '%s\n.\\"\n' \
|
||||
'PO4A-HEADER: position=^\.\\" Author; mode=after; beginboundary=^\.\\"$' \
|
||||
> "$FILE.authors"
|
||||
sed '
|
||||
/^[^#]/,$d
|
||||
/: 0BSD$/d
|
||||
/BSD Zero Clause License/d
|
||||
/distributed under the same license/d
|
||||
/in the public domain/d
|
||||
/The XZ Utils authors and contributors$/d
|
||||
/^#$/d
|
||||
s/^#/.\\"/
|
||||
' "$FILE" >> "$FILE.authors"
|
||||
done
|
||||
|
||||
# Using --force to get up-to-date version numbers in the output files
|
||||
# when nothing else has changed. This makes it slower but it's fine
|
||||
# as long as this isn't run every time when "make" is run at the
|
||||
@ -41,5 +58,13 @@ set -x
|
||||
po4a --force --verbose \
|
||||
--package-name="XZ Utils" \
|
||||
--package-version="$PACKAGE_VERSION" \
|
||||
--copyright-holder="[See the headers in the input files.]" \
|
||||
--copyright-holder="The XZ Utils authors and contributors" \
|
||||
po4a.conf
|
||||
|
||||
# Add the customized POT header which contains the SPDX license
|
||||
# identifier and spells out the license name instead of saying
|
||||
# "the same license as the XZ Utils package".
|
||||
mv xz-man.pot xz-man.pot.tmp
|
||||
cat ../po/xz.pot-header > xz-man.pot
|
||||
sed '1,/^#$/d' xz-man.pot.tmp >> xz-man.pot
|
||||
rm xz-man.pot.tmp
|
||||
|
38
src/Makefile.am
Normal file
38
src/Makefile.am
Normal file
@ -0,0 +1,38 @@
|
||||
## SPDX-License-Identifier: 0BSD
|
||||
## Author: Lasse Collin
|
||||
|
||||
SUBDIRS = liblzma xzdec
|
||||
|
||||
if COND_XZ
|
||||
SUBDIRS += xz
|
||||
endif
|
||||
|
||||
if COND_LZMAINFO
|
||||
SUBDIRS += lzmainfo
|
||||
endif
|
||||
|
||||
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
|
@ -1,8 +1,7 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*/
|
||||
|
||||
#include <winresrc.h>
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file mythread.h
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef MYTHREAD_H
|
||||
@ -79,7 +78,7 @@ do { \
|
||||
} while (0)
|
||||
|
||||
|
||||
#if !(defined(_WIN32) && !defined(__CYGWIN__))
|
||||
#if !(defined(_WIN32) && !defined(__CYGWIN__)) && !defined(__wasm__)
|
||||
// Use sigprocmask() to set the signal mask in single-threaded programs.
|
||||
#include <signal.h>
|
||||
|
||||
@ -112,6 +111,25 @@ mythread_sigmask(int how, const sigset_t *restrict set,
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
// MinGW-w64 with winpthreads:
|
||||
//
|
||||
// NOTE: Typical builds with MinGW-w64 don't use this code (MYTHREAD_POSIX).
|
||||
// Instead, native Windows threading APIs are used (MYTHREAD_VISTA or
|
||||
// MYTHREAD_WIN95).
|
||||
//
|
||||
// MinGW-w64 has _sigset_t (an integer type) in <sys/types.h>.
|
||||
// If _POSIX was #defined, the header would add the alias sigset_t too.
|
||||
// Let's keep this working even without _POSIX.
|
||||
//
|
||||
// There are no functions that actually do something with sigset_t
|
||||
// because signals barely exist on Windows. The sigfillset macro below
|
||||
// is just to silence warnings. There is no sigfillset() in MinGW-w64.
|
||||
#ifdef __MINGW32__
|
||||
# include <sys/types.h>
|
||||
# define sigset_t _sigset_t
|
||||
# define sigfillset(set_ptr) do { *(set_ptr) = 0; } while (0)
|
||||
#endif
|
||||
|
||||
#define MYTHREAD_RET_TYPE void *
|
||||
#define MYTHREAD_RET_VALUE NULL
|
||||
|
||||
@ -140,11 +158,13 @@ typedef struct timespec mythread_condtime;
|
||||
|
||||
// Use pthread_sigmask() to set the signal mask in multi-threaded programs.
|
||||
// Do nothing on OpenVMS since it lacks pthread_sigmask().
|
||||
// Do nothing on MinGW-w64 too to silence warnings (its pthread_sigmask()
|
||||
// is #defined to 0 so it's a no-op).
|
||||
static inline void
|
||||
mythread_sigmask(int how, const sigset_t *restrict set,
|
||||
sigset_t *restrict oset)
|
||||
{
|
||||
#ifdef __VMS
|
||||
#if defined(__VMS) || defined(__MINGW32__)
|
||||
(void)how;
|
||||
(void)set;
|
||||
(void)oset;
|
||||
@ -300,8 +320,8 @@ 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;
|
||||
condtime->tv_sec = (time_t)(timeout_ms / 1000);
|
||||
condtime->tv_nsec = (long)((timeout_ms % 1000) * 1000000);
|
||||
|
||||
#ifdef HAVE_CLOCK_GETTIME
|
||||
struct timespec now;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file sysdefs.h
|
||||
@ -8,9 +10,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LZMA_SYSDEFS_H
|
||||
@ -24,7 +23,15 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
// Get standard-compliant stdio functions under MinGW and MinGW-w64.
|
||||
// This #define ensures that C99 and POSIX compliant stdio functions are
|
||||
// available with MinGW-w64 (both 32-bit and 64-bit). Modern MinGW-w64 adds
|
||||
// this automatically, for example, when the compiler is in C99 (or later)
|
||||
// mode when building against msvcrt.dll. It still doesn't hurt to be explicit
|
||||
// that we always want this and #define this unconditionally.
|
||||
//
|
||||
// With Universal CRT (UCRT) this is less important because UCRT contains
|
||||
// C99-compatible stdio functions. It's still nice to #define this as UCRT
|
||||
// doesn't support the POSIX thousand separator flag in printf (like "%'u").
|
||||
#ifdef __MINGW32__
|
||||
# define __USE_MINGW_ANSI_STDIO 1
|
||||
#endif
|
||||
@ -151,13 +158,16 @@ typedef unsigned char _Bool;
|
||||
|
||||
#include <string.h>
|
||||
|
||||
// As of MSVC 2013, inline and restrict are supported with
|
||||
// non-standard keywords.
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# ifndef inline
|
||||
// Visual Studio 2013 update 2 supports only __inline, not inline.
|
||||
// MSVC v19.0 / VS 2015 and newer support both.
|
||||
//
|
||||
// MSVC v19.27 (VS 2019 version 16.7) added support for restrict.
|
||||
// Older ones support only __restrict.
|
||||
#ifdef _MSC_VER
|
||||
# if _MSC_VER < 1900 && !defined(inline)
|
||||
# define inline __inline
|
||||
# endif
|
||||
# ifndef restrict
|
||||
# if _MSC_VER < 1927 && !defined(restrict)
|
||||
# define restrict __restrict
|
||||
# endif
|
||||
#endif
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_common.h
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_COMMON_H
|
||||
@ -57,8 +56,28 @@
|
||||
# define TUKLIB_GNUC_REQ(major, minor) 0
|
||||
#endif
|
||||
|
||||
#if TUKLIB_GNUC_REQ(2, 5)
|
||||
// tuklib_attr_noreturn attribute is used to mark functions as non-returning.
|
||||
// We cannot use "noreturn" as the macro name because then C23 code that
|
||||
// uses [[noreturn]] would break as it would expand to [[ [[noreturn]] ]].
|
||||
//
|
||||
// tuklib_attr_noreturn must be used at the beginning of function declaration
|
||||
// to work in all cases. The [[noreturn]] syntax is the most limiting, it
|
||||
// must be even before any GNU C's __attribute__ keywords:
|
||||
//
|
||||
// tuklib_attr_noreturn
|
||||
// __attribute__((nonnull(1)))
|
||||
// extern void foo(const char *s);
|
||||
//
|
||||
// FIXME: Update __STDC_VERSION__ for the final C23 version. 202000 is used
|
||||
// by GCC 13 and Clang 15 with -std=c2x.
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000
|
||||
# define tuklib_attr_noreturn [[noreturn]]
|
||||
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112
|
||||
# define tuklib_attr_noreturn _Noreturn
|
||||
#elif TUKLIB_GNUC_REQ(2, 5)
|
||||
# define tuklib_attr_noreturn __attribute__((__noreturn__))
|
||||
#elif defined(_MSC_VER)
|
||||
# define tuklib_attr_noreturn __declspec(noreturn)
|
||||
#else
|
||||
# define tuklib_attr_noreturn
|
||||
#endif
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
// If config.h isn't available, assume that the headers required by
|
||||
// tuklib_common.h are available. This is required by crc32_tablegen.c.
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_cpucores.c
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_cpucores.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_cpucores.h
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_CPUCORES_H
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_exit.c
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_common.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_exit.h
|
||||
@ -6,9 +8,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_EXIT_H
|
||||
@ -18,8 +17,8 @@
|
||||
TUKLIB_DECLS_BEGIN
|
||||
|
||||
#define tuklib_exit TUKLIB_SYMBOL(tuklib_exit)
|
||||
extern void tuklib_exit(int status, int err_status, int show_error)
|
||||
tuklib_attr_noreturn;
|
||||
tuklib_attr_noreturn
|
||||
extern void tuklib_exit(int status, int err_status, int show_error);
|
||||
|
||||
TUKLIB_DECLS_END
|
||||
#endif
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_gettext.h
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_GETTEXT_H
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_integer.h
|
||||
@ -37,9 +39,6 @@
|
||||
// Authors: Lasse Collin
|
||||
// Joachim Henke
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_INTEGER_H
|
||||
@ -52,6 +51,12 @@
|
||||
// and such functions.
|
||||
#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500)
|
||||
# include <immintrin.h>
|
||||
// Only include <intrin.h> when it is needed. GCC and Clang can both
|
||||
// use __builtin's, so we only need Windows instrincs when using MSVC.
|
||||
// GCC and Clang can set _MSC_VER on Windows, so we need to exclude these
|
||||
// cases explicitly.
|
||||
#elif defined(_MSC_VER) && !TUKLIB_GNUC_REQ(3, 4) && !defined(__clang__)
|
||||
# include <intrin.h>
|
||||
#endif
|
||||
|
||||
|
||||
@ -189,6 +194,9 @@
|
||||
// Unaligned reads and writes //
|
||||
////////////////////////////////
|
||||
|
||||
// No-strict-align archs like x86-64
|
||||
// ---------------------------------
|
||||
//
|
||||
// The traditional way of casting e.g. *(const uint16_t *)uint8_pointer
|
||||
// is bad even if the uint8_pointer is properly aligned because this kind
|
||||
// of casts break strict aliasing rules and result in undefined behavior.
|
||||
@ -203,12 +211,115 @@
|
||||
// build time. A third method, casting to a packed struct, would also be
|
||||
// an option but isn't provided to keep things simpler (it's already a mess).
|
||||
// Hopefully this is flexible enough in practice.
|
||||
//
|
||||
// Some compilers on x86-64 like Clang >= 10 and GCC >= 5.1 detect that
|
||||
//
|
||||
// buf[0] | (buf[1] << 8)
|
||||
//
|
||||
// reads a 16-bit value and can emit a single 16-bit load and produce
|
||||
// identical code than with the memcpy() method. In other cases Clang and GCC
|
||||
// produce either the same or better code with memcpy(). For example, Clang 9
|
||||
// on x86-64 can detect 32-bit load but not 16-bit load.
|
||||
//
|
||||
// MSVC uses unaligned access with the memcpy() method but emits byte-by-byte
|
||||
// code for "buf[0] | (buf[1] << 8)".
|
||||
//
|
||||
// Conclusion: The memcpy() method is the best choice when unaligned access
|
||||
// is supported.
|
||||
//
|
||||
// Strict-align archs like SPARC
|
||||
// -----------------------------
|
||||
//
|
||||
// GCC versions from around 4.x to to at least 13.2.0 produce worse code
|
||||
// from the memcpy() method than from simple byte-by-byte shift-or code
|
||||
// when reading a 32-bit integer:
|
||||
//
|
||||
// (1) It may be constructed on stack using using four 8-bit loads,
|
||||
// four 8-bit stores to stack, and finally one 32-bit load from stack.
|
||||
//
|
||||
// (2) Especially with -Os, an actual memcpy() call may be emitted.
|
||||
//
|
||||
// This is true on at least on ARM, ARM64, SPARC, SPARC64, MIPS64EL, and
|
||||
// RISC-V. Of these, ARM, ARM64, and RISC-V support unaligned access in
|
||||
// some processors but not all so this is relevant only in the case when
|
||||
// GCC assumes that unaligned is not supported or -mstrict-align or
|
||||
// -mno-unaligned-access is used.
|
||||
//
|
||||
// For Clang it makes little difference. ARM64 with -O2 -mstrict-align
|
||||
// was one the very few with a minor difference: the memcpy() version
|
||||
// was one instruction longer.
|
||||
//
|
||||
// Conclusion: At least in case of GCC and Clang, byte-by-byte code is
|
||||
// the best choice for strict-align archs to do unaligned access.
|
||||
//
|
||||
// See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111502
|
||||
//
|
||||
// Thanks to <https://godbolt.org/> it was easy to test different compilers.
|
||||
// The following is for little endian targets:
|
||||
/*
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
uint32_t bytes16(const uint8_t *b)
|
||||
{
|
||||
return (uint32_t)b[0]
|
||||
| ((uint32_t)b[1] << 8);
|
||||
}
|
||||
|
||||
uint32_t copy16(const uint8_t *b)
|
||||
{
|
||||
uint16_t v;
|
||||
memcpy(&v, b, sizeof(v));
|
||||
return v;
|
||||
}
|
||||
|
||||
uint32_t bytes32(const uint8_t *b)
|
||||
{
|
||||
return (uint32_t)b[0]
|
||||
| ((uint32_t)b[1] << 8)
|
||||
| ((uint32_t)b[2] << 16)
|
||||
| ((uint32_t)b[3] << 24);
|
||||
}
|
||||
|
||||
uint32_t copy32(const uint8_t *b)
|
||||
{
|
||||
uint32_t v;
|
||||
memcpy(&v, b, sizeof(v));
|
||||
return v;
|
||||
}
|
||||
|
||||
void wbytes16(uint8_t *b, uint16_t v)
|
||||
{
|
||||
b[0] = (uint8_t)v;
|
||||
b[1] = (uint8_t)(v >> 8);
|
||||
}
|
||||
|
||||
void wcopy16(uint8_t *b, uint16_t v)
|
||||
{
|
||||
memcpy(b, &v, sizeof(v));
|
||||
}
|
||||
|
||||
void wbytes32(uint8_t *b, uint32_t v)
|
||||
{
|
||||
b[0] = (uint8_t)v;
|
||||
b[1] = (uint8_t)(v >> 8);
|
||||
b[2] = (uint8_t)(v >> 16);
|
||||
b[3] = (uint8_t)(v >> 24);
|
||||
}
|
||||
|
||||
void wcopy32(uint8_t *b, uint32_t v)
|
||||
{
|
||||
memcpy(b, &v, sizeof(v));
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
|
||||
|
||||
static inline uint16_t
|
||||
read16ne(const uint8_t *buf)
|
||||
{
|
||||
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
|
||||
&& defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
|
||||
#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
|
||||
return *(const uint16_t *)buf;
|
||||
#else
|
||||
uint16_t num;
|
||||
@ -221,8 +332,7 @@ read16ne(const uint8_t *buf)
|
||||
static inline uint32_t
|
||||
read32ne(const uint8_t *buf)
|
||||
{
|
||||
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
|
||||
&& defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
|
||||
#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
|
||||
return *(const uint32_t *)buf;
|
||||
#else
|
||||
uint32_t num;
|
||||
@ -235,8 +345,7 @@ read32ne(const uint8_t *buf)
|
||||
static inline uint64_t
|
||||
read64ne(const uint8_t *buf)
|
||||
{
|
||||
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
|
||||
&& defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
|
||||
#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
|
||||
return *(const uint64_t *)buf;
|
||||
#else
|
||||
uint64_t num;
|
||||
@ -249,8 +358,7 @@ read64ne(const uint8_t *buf)
|
||||
static inline void
|
||||
write16ne(uint8_t *buf, uint16_t num)
|
||||
{
|
||||
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
|
||||
&& defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
|
||||
#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
|
||||
*(uint16_t *)buf = num;
|
||||
#else
|
||||
memcpy(buf, &num, sizeof(num));
|
||||
@ -262,8 +370,7 @@ write16ne(uint8_t *buf, uint16_t num)
|
||||
static inline void
|
||||
write32ne(uint8_t *buf, uint32_t num)
|
||||
{
|
||||
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
|
||||
&& defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
|
||||
#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
|
||||
*(uint32_t *)buf = num;
|
||||
#else
|
||||
memcpy(buf, &num, sizeof(num));
|
||||
@ -275,8 +382,7 @@ write32ne(uint8_t *buf, uint32_t num)
|
||||
static inline void
|
||||
write64ne(uint8_t *buf, uint64_t num)
|
||||
{
|
||||
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
|
||||
&& defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
|
||||
#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
|
||||
*(uint64_t *)buf = num;
|
||||
#else
|
||||
memcpy(buf, &num, sizeof(num));
|
||||
@ -288,68 +394,122 @@ write64ne(uint8_t *buf, uint64_t num)
|
||||
static inline uint16_t
|
||||
read16be(const uint8_t *buf)
|
||||
{
|
||||
#if defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
|
||||
uint16_t num = read16ne(buf);
|
||||
return conv16be(num);
|
||||
#else
|
||||
uint16_t num = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1];
|
||||
return num;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static inline uint16_t
|
||||
read16le(const uint8_t *buf)
|
||||
{
|
||||
#if !defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
|
||||
uint16_t num = read16ne(buf);
|
||||
return conv16le(num);
|
||||
#else
|
||||
uint16_t num = ((uint16_t)buf[0]) | ((uint16_t)buf[1] << 8);
|
||||
return num;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
read32be(const uint8_t *buf)
|
||||
{
|
||||
#if defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
|
||||
uint32_t num = read32ne(buf);
|
||||
return conv32be(num);
|
||||
#else
|
||||
uint32_t num = (uint32_t)buf[0] << 24;
|
||||
num |= (uint32_t)buf[1] << 16;
|
||||
num |= (uint32_t)buf[2] << 8;
|
||||
num |= (uint32_t)buf[3];
|
||||
return num;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
read32le(const uint8_t *buf)
|
||||
{
|
||||
#if !defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
|
||||
uint32_t num = read32ne(buf);
|
||||
return conv32le(num);
|
||||
#else
|
||||
uint32_t num = (uint32_t)buf[0];
|
||||
num |= (uint32_t)buf[1] << 8;
|
||||
num |= (uint32_t)buf[2] << 16;
|
||||
num |= (uint32_t)buf[3] << 24;
|
||||
return num;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static inline uint64_t
|
||||
read64be(const uint8_t *buf)
|
||||
{
|
||||
#if defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
|
||||
uint64_t num = read64ne(buf);
|
||||
return conv64be(num);
|
||||
}
|
||||
|
||||
|
||||
static inline uint64_t
|
||||
read64le(const uint8_t *buf)
|
||||
{
|
||||
uint64_t num = read64ne(buf);
|
||||
return conv64le(num);
|
||||
}
|
||||
|
||||
|
||||
// NOTE: Possible byte swapping must be done in a macro to allow the compiler
|
||||
// to optimize byte swapping of constants when using glibc's or *BSD's
|
||||
// byte swapping macros. The actual write is done in an inline function
|
||||
// to make type checking of the buf pointer possible.
|
||||
#define write16be(buf, num) write16ne(buf, conv16be(num))
|
||||
#define write32be(buf, num) write32ne(buf, conv32be(num))
|
||||
#define write64be(buf, num) write64ne(buf, conv64be(num))
|
||||
#define write16le(buf, num) write16ne(buf, conv16le(num))
|
||||
#define write32le(buf, num) write32ne(buf, conv32le(num))
|
||||
#define write64le(buf, num) write64ne(buf, conv64le(num))
|
||||
|
||||
#else
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define read16ne read16be
|
||||
# define read32ne read32be
|
||||
# define read64ne read64be
|
||||
# define write16ne write16be
|
||||
# define write32ne write32be
|
||||
# define write64ne write64be
|
||||
#else
|
||||
# define read16ne read16le
|
||||
# define read32ne read32le
|
||||
# define read64ne read64le
|
||||
# define write16ne write16le
|
||||
# define write32ne write32le
|
||||
# define write64ne write64le
|
||||
#endif
|
||||
|
||||
|
||||
static inline uint16_t
|
||||
read16be(const uint8_t *buf)
|
||||
{
|
||||
uint16_t num = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1];
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
static inline uint16_t
|
||||
read16le(const uint8_t *buf)
|
||||
{
|
||||
uint16_t num = ((uint16_t)buf[0]) | ((uint16_t)buf[1] << 8);
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
read32be(const uint8_t *buf)
|
||||
{
|
||||
uint32_t num = (uint32_t)buf[0] << 24;
|
||||
num |= (uint32_t)buf[1] << 16;
|
||||
num |= (uint32_t)buf[2] << 8;
|
||||
num |= (uint32_t)buf[3];
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
read32le(const uint8_t *buf)
|
||||
{
|
||||
uint32_t num = (uint32_t)buf[0];
|
||||
num |= (uint32_t)buf[1] << 8;
|
||||
num |= (uint32_t)buf[2] << 16;
|
||||
num |= (uint32_t)buf[3] << 24;
|
||||
return num;
|
||||
}
|
||||
|
||||
|
||||
static inline uint64_t
|
||||
read64be(const uint8_t *buf)
|
||||
{
|
||||
uint64_t num = (uint64_t)buf[0] << 56;
|
||||
num |= (uint64_t)buf[1] << 48;
|
||||
num |= (uint64_t)buf[2] << 40;
|
||||
@ -359,17 +519,12 @@ read64be(const uint8_t *buf)
|
||||
num |= (uint64_t)buf[6] << 8;
|
||||
num |= (uint64_t)buf[7];
|
||||
return num;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static inline uint64_t
|
||||
read64le(const uint8_t *buf)
|
||||
{
|
||||
#if !defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
|
||||
uint64_t num = read64ne(buf);
|
||||
return conv64le(num);
|
||||
#else
|
||||
uint64_t num = (uint64_t)buf[0];
|
||||
num |= (uint64_t)buf[1] << 8;
|
||||
num |= (uint64_t)buf[2] << 16;
|
||||
@ -379,28 +534,9 @@ read64le(const uint8_t *buf)
|
||||
num |= (uint64_t)buf[6] << 48;
|
||||
num |= (uint64_t)buf[7] << 56;
|
||||
return num;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// NOTE: Possible byte swapping must be done in a macro to allow the compiler
|
||||
// to optimize byte swapping of constants when using glibc's or *BSD's
|
||||
// byte swapping macros. The actual write is done in an inline function
|
||||
// to make type checking of the buf pointer possible.
|
||||
#if defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
|
||||
# define write16be(buf, num) write16ne(buf, conv16be(num))
|
||||
# define write32be(buf, num) write32ne(buf, conv32be(num))
|
||||
# define write64be(buf, num) write64ne(buf, conv64be(num))
|
||||
#endif
|
||||
|
||||
#if !defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
|
||||
# define write16le(buf, num) write16ne(buf, conv16le(num))
|
||||
# define write32le(buf, num) write32ne(buf, conv32le(num))
|
||||
# define write64le(buf, num) write64ne(buf, conv64le(num))
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef write16be
|
||||
static inline void
|
||||
write16be(uint8_t *buf, uint16_t num)
|
||||
{
|
||||
@ -408,10 +544,8 @@ write16be(uint8_t *buf, uint16_t num)
|
||||
buf[1] = (uint8_t)num;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef write16le
|
||||
static inline void
|
||||
write16le(uint8_t *buf, uint16_t num)
|
||||
{
|
||||
@ -419,10 +553,8 @@ write16le(uint8_t *buf, uint16_t num)
|
||||
buf[1] = (uint8_t)(num >> 8);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef write32be
|
||||
static inline void
|
||||
write32be(uint8_t *buf, uint32_t num)
|
||||
{
|
||||
@ -432,10 +564,8 @@ write32be(uint8_t *buf, uint32_t num)
|
||||
buf[3] = (uint8_t)num;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef write32le
|
||||
static inline void
|
||||
write32le(uint8_t *buf, uint32_t num)
|
||||
{
|
||||
@ -445,6 +575,37 @@ write32le(uint8_t *buf, uint32_t num)
|
||||
buf[3] = (uint8_t)(num >> 24);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
write64be(uint8_t *buf, uint64_t num)
|
||||
{
|
||||
buf[0] = (uint8_t)(num >> 56);
|
||||
buf[1] = (uint8_t)(num >> 48);
|
||||
buf[2] = (uint8_t)(num >> 40);
|
||||
buf[3] = (uint8_t)(num >> 32);
|
||||
buf[4] = (uint8_t)(num >> 24);
|
||||
buf[5] = (uint8_t)(num >> 16);
|
||||
buf[6] = (uint8_t)(num >> 8);
|
||||
buf[7] = (uint8_t)num;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
write64le(uint8_t *buf, uint64_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[4] = (uint8_t)(num >> 32);
|
||||
buf[5] = (uint8_t)(num >> 40);
|
||||
buf[6] = (uint8_t)(num >> 48);
|
||||
buf[7] = (uint8_t)(num >> 56);
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -630,7 +791,7 @@ bsr32(uint32_t n)
|
||||
#if defined(__INTEL_COMPILER)
|
||||
return _bit_scan_reverse(n);
|
||||
|
||||
#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
|
||||
#elif (TUKLIB_GNUC_REQ(3, 4) || defined(__clang__)) && UINT_MAX == UINT32_MAX
|
||||
// GCC >= 3.4 has __builtin_clz(), which gives good results on
|
||||
// multiple architectures. On x86, __builtin_clz() ^ 31U becomes
|
||||
// either plain BSR (so the XOR gets optimized away) or LZCNT and
|
||||
@ -684,7 +845,7 @@ clz32(uint32_t n)
|
||||
#if defined(__INTEL_COMPILER)
|
||||
return _bit_scan_reverse(n) ^ 31U;
|
||||
|
||||
#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
|
||||
#elif (TUKLIB_GNUC_REQ(3, 4) || defined(__clang__)) && UINT_MAX == UINT32_MAX
|
||||
return (uint32_t)__builtin_clz(n);
|
||||
|
||||
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
@ -736,7 +897,7 @@ ctz32(uint32_t n)
|
||||
#if defined(__INTEL_COMPILER)
|
||||
return _bit_scan_forward(n);
|
||||
|
||||
#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX >= UINT32_MAX
|
||||
#elif (TUKLIB_GNUC_REQ(3, 4) || defined(__clang__)) && UINT_MAX >= UINT32_MAX
|
||||
return (uint32_t)__builtin_ctz(n);
|
||||
|
||||
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_mbstr.h
|
||||
@ -10,9 +12,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_MBSTR_H
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_mbstr_fw.c
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_mbstr.h"
|
||||
@ -27,5 +26,5 @@ tuklib_mbstr_fw(const char *str, int columns_min)
|
||||
if (width < (size_t)columns_min)
|
||||
len += (size_t)columns_min - width;
|
||||
|
||||
return len;
|
||||
return (int)len;
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_mbstr_width.c
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_mbstr.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_open_stdxxx.c
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_open_stdxxx.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_open_stdxxx.h
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_OPEN_STDXXX_H
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_physmem.c
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_physmem.h"
|
||||
@ -79,6 +78,14 @@ tuklib_physmem(void)
|
||||
uint64_t ret = 0;
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
// This requires Windows 2000 or later.
|
||||
MEMORYSTATUSEX meminfo;
|
||||
meminfo.dwLength = sizeof(meminfo);
|
||||
if (GlobalMemoryStatusEx(&meminfo))
|
||||
ret = meminfo.ullTotalPhys;
|
||||
|
||||
/*
|
||||
// Old version that is compatible with even Win95:
|
||||
if ((GetVersion() & 0xFF) >= 5) {
|
||||
// Windows 2000 and later have GlobalMemoryStatusEx() which
|
||||
// supports reporting values greater than 4 GiB. To keep the
|
||||
@ -87,8 +94,15 @@ tuklib_physmem(void)
|
||||
HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
|
||||
if (kernel32 != NULL) {
|
||||
typedef BOOL (WINAPI *gmse_type)(LPMEMORYSTATUSEX);
|
||||
#ifdef CAN_DISABLE_WCAST_FUNCTION_TYPE
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
#endif
|
||||
gmse_type gmse = (gmse_type)GetProcAddress(
|
||||
kernel32, "GlobalMemoryStatusEx");
|
||||
#ifdef CAN_DISABLE_WCAST_FUNCTION_TYPE
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
if (gmse != NULL) {
|
||||
MEMORYSTATUSEX meminfo;
|
||||
meminfo.dwLength = sizeof(meminfo);
|
||||
@ -107,6 +121,7 @@ tuklib_physmem(void)
|
||||
GlobalMemoryStatus(&meminfo);
|
||||
ret = meminfo.dwTotalPhys;
|
||||
}
|
||||
*/
|
||||
|
||||
#elif defined(__OS2__)
|
||||
unsigned long mem;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_physmem.h
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_PHYSMEM_H
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_progname.c
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "tuklib_progname.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file tuklib_progname.h
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef TUKLIB_PROGNAME_H
|
||||
|
0
src/common/tuklib_thread.cpp
Normal file
0
src/common/tuklib_thread.cpp
Normal file
126
src/liblzma/Makefile.am
Normal file
126
src/liblzma/Makefile.am
Normal file
@ -0,0 +1,126 @@
|
||||
## SPDX-License-Identifier: 0BSD
|
||||
## Author: Lasse Collin
|
||||
|
||||
SUBDIRS = api
|
||||
|
||||
EXTRA_DIST =
|
||||
CLEANFILES =
|
||||
doc_DATA =
|
||||
|
||||
lib_LTLIBRARIES = liblzma.la
|
||||
liblzma_la_SOURCES =
|
||||
liblzma_la_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/liblzma/api \
|
||||
-I$(top_srcdir)/src/liblzma/common \
|
||||
-I$(top_srcdir)/src/liblzma/check \
|
||||
-I$(top_srcdir)/src/liblzma/lz \
|
||||
-I$(top_srcdir)/src/liblzma/rangecoder \
|
||||
-I$(top_srcdir)/src/liblzma/lzma \
|
||||
-I$(top_srcdir)/src/liblzma/delta \
|
||||
-I$(top_srcdir)/src/liblzma/simple \
|
||||
-I$(top_srcdir)/src/common \
|
||||
-DTUKLIB_SYMBOL_PREFIX=lzma_
|
||||
liblzma_la_LDFLAGS = -no-undefined -version-info 11:99:6
|
||||
|
||||
EXTRA_DIST += liblzma_generic.map liblzma_linux.map validate_map.sh
|
||||
if COND_SYMVERS_GENERIC
|
||||
liblzma_la_LDFLAGS += \
|
||||
-Wl,--version-script=$(top_srcdir)/src/liblzma/liblzma_generic.map
|
||||
endif
|
||||
if COND_SYMVERS_LINUX
|
||||
liblzma_la_LDFLAGS += \
|
||||
-Wl,--version-script=$(top_srcdir)/src/liblzma/liblzma_linux.map
|
||||
endif
|
||||
|
||||
liblzma_la_SOURCES += ../common/tuklib_physmem.c
|
||||
|
||||
if COND_THREADS
|
||||
liblzma_la_SOURCES += ../common/tuklib_cpucores.c
|
||||
endif
|
||||
|
||||
include $(srcdir)/common/Makefile.inc
|
||||
include $(srcdir)/check/Makefile.inc
|
||||
|
||||
if COND_FILTER_LZ
|
||||
include $(srcdir)/lz/Makefile.inc
|
||||
endif
|
||||
|
||||
if COND_FILTER_LZMA1
|
||||
include $(srcdir)/lzma/Makefile.inc
|
||||
include $(srcdir)/rangecoder/Makefile.inc
|
||||
endif
|
||||
|
||||
if COND_FILTER_DELTA
|
||||
include $(srcdir)/delta/Makefile.inc
|
||||
endif
|
||||
|
||||
if COND_FILTER_SIMPLE
|
||||
include $(srcdir)/simple/Makefile.inc
|
||||
endif
|
||||
|
||||
|
||||
## Windows-specific stuff
|
||||
|
||||
# Windows resource compiler support. libtool knows what to do with .rc
|
||||
# files, but Automake (<= 1.11 at least) doesn't know.
|
||||
#
|
||||
# We want the resource file only in shared liblzma. To avoid linking it into
|
||||
# static liblzma, we overwrite the static object file with an object file
|
||||
# compiled from empty input. Note that GNU-specific features are OK here,
|
||||
# because on Windows we are compiled with the GNU toolchain.
|
||||
#
|
||||
# The typedef in empty.c will prevent an empty translation unit, which is
|
||||
# not allowed by the C standard. It results in a warning with
|
||||
# -Wempty-translation-unit with Clang or -pedantic for GCC.
|
||||
.rc.lo:
|
||||
$(LIBTOOL) --mode=compile $(RC) $(DEFS) $(DEFAULT_INCLUDES) \
|
||||
$(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) \
|
||||
-i $< -o $@
|
||||
echo "typedef void empty;" > empty.c
|
||||
$(COMPILE) -c empty.c -o $(*D)/$(*F).o
|
||||
|
||||
# Remove ordinals from the generated .def file. People must link by name,
|
||||
# not by ordinal, because no one is going to track the ordinal numbers.
|
||||
liblzma.def: liblzma.la liblzma.def.in
|
||||
sed 's/ \+@ *[0-9]\+//' liblzma.def.in > liblzma.def
|
||||
|
||||
# Creating liblzma.def.in is a side effect of linking the library.
|
||||
liblzma.def.in: liblzma.la
|
||||
|
||||
if COND_W32
|
||||
CLEANFILES += liblzma.def liblzma.def.in empty.c
|
||||
liblzma_la_SOURCES += liblzma_w32res.rc
|
||||
liblzma_la_LDFLAGS += -Xlinker --output-def -Xlinker liblzma.def.in
|
||||
|
||||
## liblzma.def.in is created only when building shared liblzma, so don't
|
||||
## try to create liblzma.def when not building shared liblzma.
|
||||
if COND_SHARED
|
||||
doc_DATA += liblzma.def
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
## pkg-config
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = liblzma.pc
|
||||
EXTRA_DIST += liblzma.pc.in
|
||||
|
||||
pc_verbose = $(pc_verbose_@AM_V@)
|
||||
pc_verbose_ = $(pc_verbose_@AM_DEFAULT_V@)
|
||||
pc_verbose_0 = @echo " PC " $@;
|
||||
|
||||
liblzma.pc: $(srcdir)/liblzma.pc.in
|
||||
$(AM_V_at)rm -f $@
|
||||
$(pc_verbose)sed \
|
||||
-e 's,@prefix[@],$(prefix),g' \
|
||||
-e 's,@exec_prefix[@],$(exec_prefix),g' \
|
||||
-e 's,@libdir[@],$(libdir),g' \
|
||||
-e 's,@includedir[@],$(includedir),g' \
|
||||
-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' \
|
||||
< $(srcdir)/liblzma.pc.in > $@ || { rm -f $@; exit 1; }
|
||||
|
||||
clean-local:
|
||||
rm -f liblzma.pc
|
19
src/liblzma/api/Makefile.am
Normal file
19
src/liblzma/api/Makefile.am
Normal file
@ -0,0 +1,19 @@
|
||||
## SPDX-License-Identifier: 0BSD
|
||||
## Author: Lasse Collin
|
||||
|
||||
nobase_include_HEADERS = \
|
||||
lzma.h \
|
||||
lzma/base.h \
|
||||
lzma/bcj.h \
|
||||
lzma/block.h \
|
||||
lzma/check.h \
|
||||
lzma/container.h \
|
||||
lzma/delta.h \
|
||||
lzma/filter.h \
|
||||
lzma/hardware.h \
|
||||
lzma/index.h \
|
||||
lzma/index_hash.h \
|
||||
lzma/lzma12.h \
|
||||
lzma/stream_flags.h \
|
||||
lzma/version.h \
|
||||
lzma/vli.h
|
@ -1,30 +1,30 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file api/lzma.h
|
||||
* \brief The public API of liblzma data compression library
|
||||
* \mainpage
|
||||
*
|
||||
* liblzma is a public domain general-purpose data compression library with
|
||||
* a zlib-like API. The native file format is .xz, but also the old .lzma
|
||||
* format and raw (no headers) streams are supported. Multiple compression
|
||||
* algorithms (filters) are supported. Currently LZMA2 is the primary filter.
|
||||
* liblzma is a general-purpose data compression library with a zlib-like API.
|
||||
* The native file format is .xz, but also the old .lzma format and raw (no
|
||||
* headers) streams are supported. Multiple compression algorithms (filters)
|
||||
* are supported. Currently LZMA2 is the primary filter.
|
||||
*
|
||||
* liblzma is part of XZ Utils <http://tukaani.org/xz/>. XZ Utils includes
|
||||
* a gzip-like command line tool named xz and some other tools. XZ Utils
|
||||
* is developed and maintained by Lasse Collin.
|
||||
* liblzma is part of XZ Utils <https://xz.tukaani.org/xz-utils/>. XZ Utils
|
||||
* includes a gzip-like command line tool named xz and some other tools.
|
||||
* XZ Utils is developed and maintained by Lasse Collin and Jia Tan.
|
||||
*
|
||||
* Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK
|
||||
* <http://7-zip.org/sdk.html>.
|
||||
* Major parts of liblzma are based on code written by Igor Pavlov,
|
||||
* specifically the LZMA SDK <https://7-zip.org/sdk.html>.
|
||||
*
|
||||
* The SHA-256 implementation is based on the public domain code found from
|
||||
* 7-Zip <http://7-zip.org/>, which has a modified version of the public
|
||||
* domain SHA-256 code found from Crypto++ <http://www.cryptopp.com/>.
|
||||
* The SHA-256 code in Crypto++ was written by Kevin Springle and Wei Dai.
|
||||
* The SHA-256 implementation in liblzma is based on code written by
|
||||
* Wei Dai in Crypto++ Library <https://www.cryptopp.com/>.
|
||||
*
|
||||
* liblzma is distributed under the BSD Zero Clause License (0BSD).
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H
|
||||
@ -181,11 +181,11 @@
|
||||
* against static liblzma on them, don't worry about LZMA_API_STATIC. That
|
||||
* is, most developers will never need to use LZMA_API_STATIC.
|
||||
*
|
||||
* The GCC variants are a special case on Windows (Cygwin and MinGW).
|
||||
* The GCC variants are a special case on Windows (Cygwin and MinGW-w64).
|
||||
* We rely on GCC doing the right thing with its auto-import feature,
|
||||
* and thus don't use __declspec(dllimport). This way developers don't
|
||||
* need to worry about LZMA_API_STATIC. Also the calling convention is
|
||||
* omitted on Cygwin but not on MinGW.
|
||||
* omitted on Cygwin but not on MinGW-w64.
|
||||
*/
|
||||
#ifndef LZMA_API_IMPORT
|
||||
# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
|
||||
|
@ -1,15 +1,13 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/base.h
|
||||
* \brief Data types and functions used in many places in liblzma API
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -22,8 +20,8 @@
|
||||
*
|
||||
* This is here because C89 doesn't have stdbool.h. To set a value for
|
||||
* variables having type lzma_bool, you can use
|
||||
* - C99's `true' and `false' from stdbool.h;
|
||||
* - C++'s internal `true' and `false'; or
|
||||
* - C99's 'true' and 'false' from stdbool.h;
|
||||
* - C++'s internal 'true' and 'false'; or
|
||||
* - integers one (true) and zero (false).
|
||||
*/
|
||||
typedef unsigned char lzma_bool;
|
||||
@ -138,7 +136,7 @@ typedef enum {
|
||||
*/
|
||||
|
||||
LZMA_MEMLIMIT_ERROR = 6,
|
||||
/**
|
||||
/**<
|
||||
* \brief Memory usage limit was reached
|
||||
*
|
||||
* Decoder would need more memory than allowed by the
|
||||
@ -274,13 +272,13 @@ typedef enum {
|
||||
|
||||
|
||||
/**
|
||||
* \brief The `action' argument for lzma_code()
|
||||
* \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
|
||||
* or LZMA_FINISH, the same 'action' must be 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
|
||||
* LZMA_STREAM_END. Changing the 'action' or modifying the amount of input
|
||||
* will make lzma_code() return LZMA_PROG_ERROR.
|
||||
*/
|
||||
typedef enum {
|
||||
@ -394,8 +392,8 @@ typedef enum {
|
||||
* 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).
|
||||
* 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
|
||||
@ -423,7 +421,7 @@ typedef struct {
|
||||
* liblzma never sets this to zero.
|
||||
*
|
||||
* \return Pointer to the beginning of a memory block of
|
||||
* `size' bytes, or NULL if allocation fails
|
||||
* 'size' bytes, or NULL if allocation fails
|
||||
* for some reason. When allocation fails, functions
|
||||
* of liblzma return LZMA_MEM_ERROR.
|
||||
*
|
||||
@ -546,9 +544,17 @@ typedef struct {
|
||||
* you should not touch these, because the names of these variables
|
||||
* may change.
|
||||
*/
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr4;
|
||||
|
||||
/**
|
||||
@ -563,10 +569,19 @@ typedef struct {
|
||||
*/
|
||||
uint64_t seek_pos;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint64_t reserved_int2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
size_t reserved_int3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
size_t reserved_int4;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
|
||||
} lzma_stream;
|
||||
@ -606,7 +621,15 @@ typedef struct {
|
||||
* to and get output from liblzma.
|
||||
*
|
||||
* See the description of the coder-specific initialization function to find
|
||||
* out what `action' values are supported by the coder.
|
||||
* out what 'action' values are supported by the coder.
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param action Action for this function to take. Must be a valid
|
||||
* lzma_action enum value.
|
||||
*
|
||||
* \return Any valid lzma_ret. See the lzma_ret enum description for more
|
||||
* information.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
@ -615,15 +638,15 @@ extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
|
||||
/**
|
||||
* \brief Free memory allocated for the coder data structures
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
*
|
||||
* After lzma_end(strm), strm->internal is guaranteed to be NULL. No other
|
||||
* members of the lzma_stream structure are touched.
|
||||
*
|
||||
* \note zlib indicates an error if application end()s unfinished
|
||||
* stream structure. liblzma doesn't do this, and assumes that
|
||||
* application knows what it is doing.
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
*/
|
||||
extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
|
||||
|
||||
@ -642,6 +665,11 @@ extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
|
||||
* 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.
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least
|
||||
* initialized with LZMA_STREAM_INIT.
|
||||
* \param[out] progress_in Pointer to the number of input bytes processed.
|
||||
* \param[out] progress_out Pointer to the number of output bytes processed.
|
||||
*/
|
||||
extern LZMA_API(void) lzma_get_progress(lzma_stream *strm,
|
||||
uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow;
|
||||
@ -660,6 +688,9 @@ extern LZMA_API(void) lzma_get_progress(lzma_stream *strm,
|
||||
* this may give misleading information if decoding .xz Streams that have
|
||||
* multiple Blocks, because each Block can have different memory requirements.
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
*
|
||||
* \return How much memory is currently allocated for the filter
|
||||
* decoders. If no filter chain is currently allocated,
|
||||
* some non-zero value is still returned, which is less than
|
||||
@ -679,6 +710,9 @@ extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
|
||||
* This function is supported only when *strm has been initialized with
|
||||
* a function that takes a memlimit argument.
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
*
|
||||
* \return On success, the current memory usage limit is returned
|
||||
* (always non-zero). On error, zero is returned.
|
||||
*/
|
||||
@ -702,7 +736,8 @@ extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
|
||||
* after LZMA_MEMLIMIT_ERROR even if the limit was increased using
|
||||
* lzma_memlimit_set(). Other decoders worked correctly.
|
||||
*
|
||||
* \return - LZMA_OK: New memory usage limit successfully set.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: New memory usage limit successfully set.
|
||||
* - LZMA_MEMLIMIT_ERROR: The new limit is too small.
|
||||
* The limit was not changed.
|
||||
* - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't
|
||||
|
@ -1,15 +1,13 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/bcj.h
|
||||
* \brief Branch/Call/Jump conversion filters
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -19,43 +17,49 @@
|
||||
|
||||
/* Filter IDs for lzma_filter.id */
|
||||
|
||||
/**
|
||||
* \brief Filter for x86 binaries
|
||||
*/
|
||||
#define LZMA_FILTER_X86 LZMA_VLI_C(0x04)
|
||||
/**<
|
||||
* Filter for x86 binaries
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_POWERPC LZMA_VLI_C(0x05)
|
||||
/**<
|
||||
* Filter for Big endian PowerPC binaries
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_IA64 LZMA_VLI_C(0x06)
|
||||
/**<
|
||||
* Filter for IA-64 (Itanium) binaries.
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_ARM LZMA_VLI_C(0x07)
|
||||
/**<
|
||||
* Filter for ARM binaries.
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_ARMTHUMB LZMA_VLI_C(0x08)
|
||||
/**<
|
||||
* Filter for ARM-Thumb binaries.
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_SPARC LZMA_VLI_C(0x09)
|
||||
/**<
|
||||
* Filter for SPARC binaries.
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_ARM64 LZMA_VLI_C(0x0A)
|
||||
/**<
|
||||
* Filter for ARM64 binaries.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Options for BCJ filters (except ARM64)
|
||||
* \brief Filter for Big endian PowerPC binaries
|
||||
*/
|
||||
#define LZMA_FILTER_POWERPC LZMA_VLI_C(0x05)
|
||||
|
||||
/**
|
||||
* \brief Filter for IA-64 (Itanium) binaries
|
||||
*/
|
||||
#define LZMA_FILTER_IA64 LZMA_VLI_C(0x06)
|
||||
|
||||
/**
|
||||
* \brief Filter for ARM binaries
|
||||
*/
|
||||
#define LZMA_FILTER_ARM LZMA_VLI_C(0x07)
|
||||
|
||||
/**
|
||||
* \brief Filter for ARM-Thumb binaries
|
||||
*/
|
||||
#define LZMA_FILTER_ARMTHUMB LZMA_VLI_C(0x08)
|
||||
|
||||
/**
|
||||
* \brief Filter for SPARC binaries
|
||||
*/
|
||||
#define LZMA_FILTER_SPARC LZMA_VLI_C(0x09)
|
||||
|
||||
/**
|
||||
* \brief Filter for ARM64 binaries
|
||||
*/
|
||||
#define LZMA_FILTER_ARM64 LZMA_VLI_C(0x0A)
|
||||
|
||||
/**
|
||||
* \brief Filter for RISC-V binaries
|
||||
*/
|
||||
#define LZMA_FILTER_RISCV LZMA_VLI_C(0x0B)
|
||||
|
||||
|
||||
/**
|
||||
* \brief Options for BCJ filters
|
||||
*
|
||||
* The BCJ filters never change the size of the data. Specifying options
|
||||
* for them is optional: if pointer to options is NULL, default value is
|
||||
|
@ -1,15 +1,13 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/block.h
|
||||
* \brief .xz Block handling
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -32,19 +30,28 @@ 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
|
||||
* a version number is used to indicate which members 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.
|
||||
* which adds the ignore_check member.
|
||||
*
|
||||
* If version is greater than one, most Block related functions
|
||||
* will return LZMA_OPTIONS_ERROR (lzma_block_header_decode() works
|
||||
* with any version value).
|
||||
*
|
||||
* Read by:
|
||||
* - All functions that take pointer to lzma_block as argument,
|
||||
* including lzma_block_header_decode().
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_header_encode()
|
||||
* - lzma_block_header_decode()
|
||||
* - lzma_block_compressed_size()
|
||||
* - lzma_block_unpadded_size()
|
||||
* - lzma_block_total_size()
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_encode()
|
||||
* - lzma_block_uncomp_encode()
|
||||
* - lzma_block_buffer_decode()
|
||||
*
|
||||
* Written by:
|
||||
* - lzma_block_header_decode()
|
||||
@ -52,7 +59,7 @@ typedef struct {
|
||||
uint32_t version;
|
||||
|
||||
/**
|
||||
* \brief Size of the Block Header field
|
||||
* \brief Size of the Block Header field in bytes
|
||||
*
|
||||
* This is always a multiple of four.
|
||||
*
|
||||
@ -68,6 +75,7 @@ typedef struct {
|
||||
* Written by:
|
||||
* - lzma_block_header_size()
|
||||
* - lzma_block_buffer_encode()
|
||||
* - lzma_block_uncomp_encode()
|
||||
*/
|
||||
uint32_t header_size;
|
||||
# define LZMA_BLOCK_HEADER_SIZE_MIN 8
|
||||
@ -143,6 +151,7 @@ typedef struct {
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_encode()
|
||||
* - lzma_block_uncomp_encode()
|
||||
* - lzma_block_buffer_decode()
|
||||
*/
|
||||
lzma_vli compressed_size;
|
||||
@ -167,6 +176,7 @@ typedef struct {
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_encode()
|
||||
* - lzma_block_uncomp_encode()
|
||||
* - lzma_block_buffer_decode()
|
||||
*/
|
||||
lzma_vli uncompressed_size;
|
||||
@ -212,6 +222,7 @@ typedef struct {
|
||||
* - lzma_block_encoder()
|
||||
* - lzma_block_decoder()
|
||||
* - lzma_block_buffer_encode()
|
||||
* - lzma_block_uncomp_encode()
|
||||
* - lzma_block_buffer_decode()
|
||||
*/
|
||||
uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
|
||||
@ -223,26 +234,56 @@ typedef struct {
|
||||
* with the currently supported options, so it is safe to leave these
|
||||
* uninitialized.
|
||||
*/
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_int3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_int4;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_int5;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_int6;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_int7;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_int8;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
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.
|
||||
* This member 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
|
||||
@ -260,12 +301,25 @@ typedef struct {
|
||||
*/
|
||||
lzma_bool ignore_check;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool4;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool5;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool6;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool7;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool8;
|
||||
|
||||
} lzma_block;
|
||||
@ -280,7 +334,8 @@ typedef struct {
|
||||
* Note that if the first byte is 0x00, it indicates beginning of Index; use
|
||||
* this macro only when the byte is not 0x00.
|
||||
*
|
||||
* There is no encoding macro, because Block Header encoder is enough for that.
|
||||
* There is no encoding macro because lzma_block_header_size() and
|
||||
* lzma_block_header_encode() should be used.
|
||||
*/
|
||||
#define lzma_block_header_size_decode(b) (((uint32_t)(b) + 1) * 4)
|
||||
|
||||
@ -294,17 +349,20 @@ typedef struct {
|
||||
* four and doesn't exceed LZMA_BLOCK_HEADER_SIZE_MAX. Increasing header_size
|
||||
* just means that lzma_block_header_encode() will add Header Padding.
|
||||
*
|
||||
* \return - LZMA_OK: Size calculated successfully and stored to
|
||||
* block->header_size.
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported version, filters or
|
||||
* filter options.
|
||||
* - LZMA_PROG_ERROR: Invalid values like compressed_size == 0.
|
||||
*
|
||||
* \note This doesn't check that all the options are valid i.e. this
|
||||
* may return LZMA_OK even if lzma_block_header_encode() or
|
||||
* lzma_block_encoder() would fail. If you want to validate the
|
||||
* filter chain, consider using lzma_memlimit_encoder() which as
|
||||
* a side-effect validates the filter chain.
|
||||
*
|
||||
* \param block Block options
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Size calculated successfully and stored to
|
||||
* block->header_size.
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported version, filters or
|
||||
* filter options.
|
||||
* - LZMA_PROG_ERROR: Invalid values like compressed_size == 0.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_block_header_size(lzma_block *block)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
@ -318,11 +376,12 @@ extern LZMA_API(lzma_ret) lzma_block_header_size(lzma_block *block)
|
||||
* lzma_block_header_size() is used, the Block Header will be padded to the
|
||||
* specified size.
|
||||
*
|
||||
* \param out Beginning of the output buffer. This must be
|
||||
* at least block->header_size bytes.
|
||||
* \param block Block options to be encoded.
|
||||
* \param[out] out Beginning of the output buffer. This must be
|
||||
* at least block->header_size bytes.
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful. block->header_size
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Encoding was successful. block->header_size
|
||||
* bytes were written to output buffer.
|
||||
* - LZMA_OPTIONS_ERROR: Invalid or unsupported options.
|
||||
* - LZMA_PROG_ERROR: Invalid arguments, for example
|
||||
@ -354,14 +413,15 @@ extern LZMA_API(lzma_ret) lzma_block_header_encode(
|
||||
* block->filters must have been allocated, but they don't need to be
|
||||
* initialized (possible existing filter options are not freed).
|
||||
*
|
||||
* \param block Destination for Block options.
|
||||
* \param[out] block Destination for Block options
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() (and also free()
|
||||
* if an error occurs).
|
||||
* \param in Beginning of the input buffer. This must be
|
||||
* at least block->header_size bytes.
|
||||
*
|
||||
* \return - LZMA_OK: Decoding was successful. block->header_size
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Decoding was successful. block->header_size
|
||||
* bytes were read from the input buffer.
|
||||
* - LZMA_OPTIONS_ERROR: The Block Header specifies some
|
||||
* unsupported options such as unsupported filters. This can
|
||||
@ -398,7 +458,12 @@ extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block,
|
||||
* field so that it can properly validate Compressed Size if it
|
||||
* was present in Block Header.
|
||||
*
|
||||
* \return - LZMA_OK: block->compressed_size was set successfully.
|
||||
* \param block Block options: block->header_size must
|
||||
* already be set with lzma_block_header_size().
|
||||
* \param unpadded_size Unpadded Size from the Index field in bytes
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: block->compressed_size was set successfully.
|
||||
* - LZMA_DATA_ERROR: unpadded_size is too small compared to
|
||||
* block->header_size and lzma_check_size(block->check).
|
||||
* - LZMA_PROG_ERROR: Some values are invalid. For example,
|
||||
@ -419,6 +484,9 @@ extern LZMA_API(lzma_ret) lzma_block_compressed_size(
|
||||
* Compressed Size, and size of the Check field. This is where this function
|
||||
* is needed.
|
||||
*
|
||||
* \param block Block options: block->header_size must already be
|
||||
* set with lzma_block_header_size().
|
||||
*
|
||||
* \return Unpadded Size on success, or zero on error.
|
||||
*/
|
||||
extern LZMA_API(lzma_vli) lzma_block_unpadded_size(const lzma_block *block)
|
||||
@ -431,6 +499,9 @@ extern LZMA_API(lzma_vli) lzma_block_unpadded_size(const lzma_block *block)
|
||||
* This is equivalent to lzma_block_unpadded_size() except that the returned
|
||||
* value includes the size of the Block Padding field.
|
||||
*
|
||||
* \param block Block options: block->header_size must already be
|
||||
* set with lzma_block_header_size().
|
||||
*
|
||||
* \return On success, total encoded size of the Block. On error,
|
||||
* zero is returned.
|
||||
*/
|
||||
@ -444,7 +515,17 @@ extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block)
|
||||
* Valid actions for lzma_code() are LZMA_RUN, LZMA_SYNC_FLUSH (only if the
|
||||
* filter chain supports it), and LZMA_FINISH.
|
||||
*
|
||||
* \return - LZMA_OK: All good, continue with lzma_code().
|
||||
* The Block encoder encodes the Block Data, Block Padding, and Check value.
|
||||
* It does NOT encode the Block Header which can be encoded with
|
||||
* lzma_block_header_encode().
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param block Block options: block->version, block->check,
|
||||
* and block->filters must have been initialized.
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: All good, continue with lzma_code().
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID
|
||||
@ -463,7 +544,16 @@ extern LZMA_API(lzma_ret) lzma_block_encoder(
|
||||
* Valid actions for lzma_code() are LZMA_RUN and LZMA_FINISH. Using
|
||||
* LZMA_FINISH is not required. It is supported only for convenience.
|
||||
*
|
||||
* \return - LZMA_OK: All good, continue with lzma_code().
|
||||
* The Block decoder decodes the Block Data, Block Padding, and Check value.
|
||||
* It does NOT decode the Block Header which can be decoded with
|
||||
* lzma_block_header_decode().
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param block Block options
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: All good, continue with lzma_code().
|
||||
* - LZMA_PROG_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
*/
|
||||
@ -477,6 +567,11 @@ extern LZMA_API(lzma_ret) lzma_block_decoder(
|
||||
*
|
||||
* This is equivalent to lzma_stream_buffer_bound() but for .xz Blocks.
|
||||
* See the documentation of lzma_stream_buffer_bound().
|
||||
*
|
||||
* \param uncompressed_size Size of the data to be encoded with the
|
||||
* single-call Block encoder.
|
||||
*
|
||||
* \return Maximum output size in bytes for single-call Block encoding.
|
||||
*/
|
||||
extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size)
|
||||
lzma_nothrow;
|
||||
@ -505,13 +600,14 @@ extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size)
|
||||
* Set to NULL to use malloc() and free().
|
||||
* \param in Beginning of the input buffer
|
||||
* \param in_size Size of the input buffer
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* \param[out] out Beginning of the output buffer
|
||||
* \param[out] out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if encoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_BUF_ERROR: Not enough output buffer space.
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
@ -537,6 +633,25 @@ extern LZMA_API(lzma_ret) lzma_block_buffer_encode(
|
||||
* 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.
|
||||
*
|
||||
* \param block Block options: block->version, block->check,
|
||||
* and block->filters must have been initialized.
|
||||
* \param in Beginning of the input buffer
|
||||
* \param in_size Size of the input buffer
|
||||
* \param[out] out Beginning of the output buffer
|
||||
* \param[out] out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if encoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_BUF_ERROR: Not enough output buffer space.
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_DATA_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block,
|
||||
const uint8_t *in, size_t in_size,
|
||||
@ -550,7 +665,7 @@ extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block,
|
||||
* This is single-call equivalent of lzma_block_decoder(), and requires that
|
||||
* the caller has already decoded Block Header and checked its memory usage.
|
||||
*
|
||||
* \param block Block options just like with lzma_block_decoder().
|
||||
* \param block Block options
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
* \param in Beginning of the input buffer
|
||||
@ -558,13 +673,14 @@ extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block,
|
||||
* *in_pos is updated only if decoding succeeds.
|
||||
* \param in_size Size of the input buffer; the first byte that
|
||||
* won't be read is in[in_size].
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* \param[out] out Beginning of the output buffer
|
||||
* \param[out] out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if encoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
* \return - LZMA_OK: Decoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Decoding was successful.
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_DATA_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
|
@ -1,15 +1,13 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/check.h
|
||||
* \brief Integrity checks
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -71,12 +69,17 @@ typedef enum {
|
||||
/**
|
||||
* \brief Test if the given Check ID is supported
|
||||
*
|
||||
* Return true if the given Check ID is supported by this liblzma build.
|
||||
* Otherwise false is returned. It is safe to call this with a value that
|
||||
* is not in the range [0, 15]; in that case the return value is always false.
|
||||
* LZMA_CHECK_NONE and LZMA_CHECK_CRC32 are always supported (even if
|
||||
* liblzma is built with limited features).
|
||||
*
|
||||
* You can assume that LZMA_CHECK_NONE and LZMA_CHECK_CRC32 are always
|
||||
* supported (even if liblzma is built with limited features).
|
||||
* \note It is safe to call this with a value that is not in the
|
||||
* range [0, 15]; in that case the return value is always false.
|
||||
*
|
||||
* \param check Check ID
|
||||
*
|
||||
* \return lzma_bool:
|
||||
* - true if Check ID is supported by this liblzma build.
|
||||
* - false otherwise.
|
||||
*/
|
||||
extern LZMA_API(lzma_bool) lzma_check_is_supported(lzma_check check)
|
||||
lzma_nothrow lzma_attr_const;
|
||||
@ -90,7 +93,10 @@ extern LZMA_API(lzma_bool) lzma_check_is_supported(lzma_check check)
|
||||
* the Check field with the specified Check ID. The values are:
|
||||
* { 0, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 32, 64, 64, 64 }
|
||||
*
|
||||
* If the argument is not in the range [0, 15], UINT32_MAX is returned.
|
||||
* \param check Check ID
|
||||
*
|
||||
* \return Size of the Check field in bytes. If the argument is not in
|
||||
* the range [0, 15], UINT32_MAX is returned.
|
||||
*/
|
||||
extern LZMA_API(uint32_t) lzma_check_size(lzma_check check)
|
||||
lzma_nothrow lzma_attr_const;
|
||||
@ -126,25 +132,32 @@ extern LZMA_API(uint32_t) lzma_crc32(
|
||||
*
|
||||
* Calculate CRC64 using the polynomial from the ECMA-182 standard.
|
||||
*
|
||||
* This function is used similarly to lzma_crc32(). See its documentation.
|
||||
* This function is used similarly to lzma_crc32().
|
||||
*
|
||||
* \param buf Pointer to the input buffer
|
||||
* \param size Size of the input buffer
|
||||
* \param crc Previously returned CRC value. This is used to
|
||||
* calculate the CRC of a big buffer in smaller chunks.
|
||||
* Set to zero when starting a new calculation.
|
||||
*
|
||||
* \return Updated CRC value, which can be passed to this function
|
||||
* again to continue CRC calculation.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_crc64(
|
||||
const uint8_t *buf, size_t size, uint64_t crc)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
|
||||
|
||||
/*
|
||||
* SHA-256 functions are currently not exported to public API.
|
||||
* Contact Lasse Collin if you think it should be.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get the type of the integrity check
|
||||
*
|
||||
* This function can be called only immediately after lzma_code() has
|
||||
* returned LZMA_NO_CHECK, LZMA_UNSUPPORTED_CHECK, or LZMA_GET_CHECK.
|
||||
* Calling this function in any other situation has undefined behavior.
|
||||
*
|
||||
* \param strm Pointer to lzma_stream meeting the above conditions.
|
||||
*
|
||||
* \return Check ID in the lzma_stream, or undefined if called improperly.
|
||||
*/
|
||||
extern LZMA_API(lzma_check) lzma_get_check(const lzma_stream *strm)
|
||||
lzma_nothrow;
|
||||
|
@ -1,15 +1,13 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/container.h
|
||||
* \brief File formats
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -51,7 +49,7 @@
|
||||
*
|
||||
* This flag modifies the preset to make the encoding significantly slower
|
||||
* while improving the compression ratio only marginally. This is useful
|
||||
* when you don't mind wasting time to get as small result as possible.
|
||||
* when you don't mind spending time to get as small result as possible.
|
||||
*
|
||||
* This flag doesn't affect the memory usage requirements of the decoder (at
|
||||
* least not significantly). The memory usage of the encoder may be increased
|
||||
@ -72,9 +70,12 @@ typedef struct {
|
||||
* Encoder: No flags are currently supported.
|
||||
*
|
||||
* Decoder: Bitwise-or of zero or more of the decoder flags:
|
||||
* LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
|
||||
* LZMA_TELL_ANY_CHECK, LZMA_IGNORE_CHECK,
|
||||
* LZMA_CONCATENATED, LZMA_FAIL_FAST
|
||||
* - LZMA_TELL_NO_CHECK
|
||||
* - LZMA_TELL_UNSUPPORTED_CHECK
|
||||
* - LZMA_TELL_ANY_CHECK
|
||||
* - LZMA_IGNORE_CHECK
|
||||
* - LZMA_CONCATENATED
|
||||
* - LZMA_FAIL_FAST
|
||||
*/
|
||||
uint32_t flags;
|
||||
|
||||
@ -111,7 +112,7 @@ typedef struct {
|
||||
/**
|
||||
* \brief Timeout to allow lzma_code() to return early
|
||||
*
|
||||
* Multithreading can make liblzma to consume input and produce
|
||||
* Multithreading can make liblzma 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.
|
||||
@ -128,14 +129,13 @@ typedef struct {
|
||||
* 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
|
||||
* If long blocking times are acceptable, set timeout to a special
|
||||
* value of 0. This 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.
|
||||
* a long time to return. No timing guarantees are made.
|
||||
*/
|
||||
uint32_t timeout;
|
||||
|
||||
@ -171,12 +171,25 @@ typedef struct {
|
||||
* with the currently supported options, so it is safe to leave these
|
||||
* uninitialized.
|
||||
*/
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int4;
|
||||
|
||||
/**
|
||||
@ -222,11 +235,22 @@ typedef struct {
|
||||
*/
|
||||
uint64_t memlimit_stop;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint64_t reserved_int7;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint64_t reserved_int8;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr4;
|
||||
|
||||
} lzma_mt;
|
||||
@ -240,8 +264,7 @@ typedef struct {
|
||||
* \param preset Compression preset (level and possible flags)
|
||||
*
|
||||
* \return Number of bytes of memory required for the given
|
||||
* preset when encoding. If an error occurs, for example
|
||||
* due to unsupported preset, UINT64_MAX is returned.
|
||||
* preset when encoding or UINT64_MAX on error.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -255,9 +278,8 @@ extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
|
||||
* \param preset Compression preset (level and possible flags)
|
||||
*
|
||||
* \return Number of bytes of memory required to decompress a file
|
||||
* that was compressed using the given preset. If an error
|
||||
* occurs, for example due to unsupported preset, UINT64_MAX
|
||||
* is returned.
|
||||
* that was compressed using the given preset or UINT64_MAX
|
||||
* on error.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -267,7 +289,16 @@ extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
|
||||
* \brief Initialize .xz Stream encoder using a preset number
|
||||
*
|
||||
* This function is intended for those who just want to use the basic features
|
||||
* if liblzma (that is, most developers out there).
|
||||
* of liblzma (that is, most developers out there).
|
||||
*
|
||||
* If initialization fails (return value is not LZMA_OK), all the memory
|
||||
* allocated for *strm by liblzma is always freed. Thus, there is no need
|
||||
* to call lzma_end() after failed initialization.
|
||||
*
|
||||
* If initialization succeeds, use lzma_code() to do the actual encoding.
|
||||
* Valid values for 'action' (the second argument of lzma_code()) are
|
||||
* LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future,
|
||||
* there may be compression levels or flags that don't support LZMA_SYNC_FLUSH.
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
@ -283,7 +314,8 @@ extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
|
||||
* unsure. LZMA_CHECK_CRC32 is good too as long as the
|
||||
* uncompressed file is not many gigabytes.
|
||||
*
|
||||
* \return - LZMA_OK: Initialization succeeded. Use lzma_code() to
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Initialization succeeded. Use lzma_code() to
|
||||
* encode your data.
|
||||
* - LZMA_MEM_ERROR: Memory allocation failed.
|
||||
* - LZMA_OPTIONS_ERROR: The given compression preset is not
|
||||
@ -292,15 +324,6 @@ extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
|
||||
* supported by this liblzma build.
|
||||
* - LZMA_PROG_ERROR: One or more of the parameters have values
|
||||
* that will never be valid. For example, strm == NULL.
|
||||
*
|
||||
* If initialization fails (return value is not LZMA_OK), all the memory
|
||||
* allocated for *strm by liblzma is always freed. Thus, there is no need
|
||||
* to call lzma_end() after failed initialization.
|
||||
*
|
||||
* If initialization succeeds, use lzma_code() to do the actual encoding.
|
||||
* Valid values for `action' (the second argument of lzma_code()) are
|
||||
* LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future,
|
||||
* there may be compression levels or flags that don't support LZMA_SYNC_FLUSH.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_easy_encoder(
|
||||
lzma_stream *strm, uint32_t preset, lzma_check check)
|
||||
@ -321,13 +344,14 @@ extern LZMA_API(lzma_ret) lzma_easy_encoder(
|
||||
* Set to NULL to use malloc() and free().
|
||||
* \param in Beginning of the input buffer
|
||||
* \param in_size Size of the input buffer
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* \param[out] out Beginning of the output buffer
|
||||
* \param[out] out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if encoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_BUF_ERROR: Not enough output buffer space.
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
@ -345,14 +369,16 @@ extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
|
||||
/**
|
||||
* \brief Initialize .xz Stream encoder using a custom filter chain
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param filters Array of filters. This must be terminated with
|
||||
* filters[n].id = LZMA_VLI_UNKNOWN. See filter.h for
|
||||
* more information.
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN. See filters.h for more
|
||||
* information.
|
||||
* \param check Type of the integrity check to calculate from
|
||||
* uncompressed data.
|
||||
*
|
||||
* \return - LZMA_OK: Initialization was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Initialization was successful.
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
@ -392,10 +418,12 @@ extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage(
|
||||
* 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 strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param options Pointer to multithreaded compression options
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
@ -406,6 +434,34 @@ extern LZMA_API(lzma_ret) lzma_stream_encoder_mt(
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate recommended Block size for multithreaded .xz encoder
|
||||
*
|
||||
* This calculates a recommended Block size for multithreaded encoding given
|
||||
* a filter chain. This is used internally by lzma_stream_encoder_mt() to
|
||||
* determine the Block size if the block_size member is not set to the
|
||||
* special value of 0 in the lzma_mt options struct.
|
||||
*
|
||||
* If one wishes to change the filters between Blocks, this function is
|
||||
* helpful to set the block_size member of the lzma_mt struct before calling
|
||||
* lzma_stream_encoder_mt(). Since the block_size member represents the
|
||||
* maximum possible Block size for the multithreaded .xz encoder, one can
|
||||
* use this function to find the maximum recommended Block size based on
|
||||
* all planned filter chains. Otherwise, the multithreaded encoder will
|
||||
* base its maximum Block size on the first filter chain used (if the
|
||||
* block_size member is not set), which may unnecessarily limit the Block
|
||||
* size for a later filter chain.
|
||||
*
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* \return Recommended Block size in bytes, or UINT64_MAX if
|
||||
* an error occurred.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_mt_block_size(const lzma_filter *filters)
|
||||
lzma_nothrow;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initialize .lzma encoder (legacy file format)
|
||||
*
|
||||
@ -421,7 +477,12 @@ extern LZMA_API(lzma_ret) lzma_stream_encoder_mt(
|
||||
* No kind of flushing is supported, because the file format doesn't make
|
||||
* it possible.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param options Pointer to encoder options
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
@ -434,7 +495,7 @@ extern LZMA_API(lzma_ret) lzma_alone_encoder(
|
||||
/**
|
||||
* \brief Calculate output buffer size for single-call Stream encoder
|
||||
*
|
||||
* When trying to compress uncompressible data, the encoded size will be
|
||||
* When trying to compress incompressible data, the encoded size will be
|
||||
* slightly bigger than the input data. This function calculates how much
|
||||
* output buffer space is required to be sure that lzma_stream_buffer_encode()
|
||||
* doesn't return LZMA_BUF_ERROR.
|
||||
@ -450,8 +511,13 @@ extern LZMA_API(lzma_ret) lzma_alone_encoder(
|
||||
* \note The limit calculated by this function applies only to
|
||||
* single-call encoding. Multi-call encoding may (and probably
|
||||
* will) have larger maximum expansion when encoding
|
||||
* uncompressible data. Currently there is no function to
|
||||
* incompressible data. Currently there is no function to
|
||||
* calculate the maximum expansion of multi-call encoding.
|
||||
*
|
||||
* \param uncompressed_size Size in bytes of the uncompressed
|
||||
* input data
|
||||
*
|
||||
* \return Maximum number of bytes needed to store the compressed data.
|
||||
*/
|
||||
extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
|
||||
lzma_nothrow;
|
||||
@ -460,22 +526,23 @@ extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
|
||||
/**
|
||||
* \brief Single-call .xz Stream encoder
|
||||
*
|
||||
* \param filters Array of filters. This must be terminated with
|
||||
* filters[n].id = LZMA_VLI_UNKNOWN. See filter.h
|
||||
* for more information.
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN. See filters.h for more
|
||||
* information.
|
||||
* \param check Type of the integrity check to calculate from
|
||||
* uncompressed data.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
* \param in Beginning of the input buffer
|
||||
* \param in_size Size of the input buffer
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* \param[out] out Beginning of the output buffer
|
||||
* \param[out] out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if encoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_BUF_ERROR: Not enough output buffer space.
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
@ -531,7 +598,12 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
|
||||
* uses too where many small streams are needed. XZ Embedded includes a
|
||||
* decoder for this format.
|
||||
*
|
||||
* \return - LZMA_STREAM_END: All good. Check the amounts of input used
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param options Pointer to encoder options
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_STREAM_END: All good. Check the amounts of input used
|
||||
* and output produced. Store the amount of input used
|
||||
* (uncompressed size) as it needs to be known to decompress
|
||||
* the data.
|
||||
@ -542,7 +614,8 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
|
||||
* output space (6 bytes) to create a valid MicroLZMA stream.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_microlzma_encoder(
|
||||
lzma_stream *strm, const lzma_options_lzma *options);
|
||||
lzma_stream *strm, const lzma_options_lzma *options)
|
||||
lzma_nothrow;
|
||||
|
||||
|
||||
/************
|
||||
@ -605,13 +678,13 @@ extern LZMA_API(lzma_ret) lzma_microlzma_encoder(
|
||||
* supported by liblzma, only the .xz and .lz formats allow concatenated
|
||||
* files. Concatenated files are not allowed with the legacy .lzma format.
|
||||
*
|
||||
* This flag also affects the usage of the `action' argument for lzma_code().
|
||||
* This flag also affects the usage of the 'action' argument for lzma_code().
|
||||
* When LZMA_CONCATENATED is used, lzma_code() won't return LZMA_STREAM_END
|
||||
* unless LZMA_FINISH is used as `action'. Thus, the application has to set
|
||||
* unless LZMA_FINISH is used as 'action'. Thus, the application has to set
|
||||
* LZMA_FINISH in the same way as it does when encoding.
|
||||
*
|
||||
* If LZMA_CONCATENATED is not used, the decoders still accept LZMA_FINISH
|
||||
* as `action' for lzma_code(), but the usage of LZMA_FINISH isn't required.
|
||||
* as 'action' for lzma_code(), but the usage of LZMA_FINISH isn't required.
|
||||
*/
|
||||
#define LZMA_CONCATENATED UINT32_C(0x08)
|
||||
|
||||
@ -648,7 +721,8 @@ extern LZMA_API(lzma_ret) lzma_microlzma_encoder(
|
||||
/**
|
||||
* \brief Initialize .xz Stream decoder
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param memlimit Memory usage limit as bytes. Use UINT64_MAX
|
||||
* to effectively disable the limiter. liblzma
|
||||
* 5.2.3 and earlier don't allow 0 here and return
|
||||
@ -659,7 +733,8 @@ extern LZMA_API(lzma_ret) lzma_microlzma_encoder(
|
||||
* LZMA_TELL_ANY_CHECK, LZMA_IGNORE_CHECK,
|
||||
* LZMA_CONCATENATED, LZMA_FAIL_FAST
|
||||
*
|
||||
* \return - LZMA_OK: Initialization was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Initialization was successful.
|
||||
* - LZMA_MEM_ERROR: Cannot allocate memory.
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported flags
|
||||
* - LZMA_PROG_ERROR
|
||||
@ -672,9 +747,6 @@ extern LZMA_API(lzma_ret) lzma_stream_decoder(
|
||||
/**
|
||||
* \brief Initialize multithreaded .xz Stream decoder
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param options Pointer to multithreaded compression options
|
||||
*
|
||||
* The decoder can decode multiple Blocks in parallel. This requires that each
|
||||
* Block Header contains the Compressed Size and Uncompressed size fields
|
||||
* which are added by the multi-threaded encoder, see lzma_stream_encoder_mt().
|
||||
@ -688,7 +760,12 @@ extern LZMA_API(lzma_ret) lzma_stream_decoder(
|
||||
* This function behaves like lzma_stream_decoder() when options->threads == 1
|
||||
* and options->memlimit_threading <= 1.
|
||||
*
|
||||
* \return - LZMA_OK: Initialization was successful.
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param options Pointer to multithreaded compression options
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Initialization was successful.
|
||||
* - LZMA_MEM_ERROR: Cannot allocate memory.
|
||||
* - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported flags.
|
||||
@ -715,7 +792,8 @@ extern LZMA_API(lzma_ret) lzma_stream_decoder_mt(
|
||||
* as it doesn't support any decoder flags. It will return LZMA_STREAM_END
|
||||
* after one .lzma stream.)
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param memlimit Memory usage limit as bytes. Use UINT64_MAX
|
||||
* to effectively disable the limiter. liblzma
|
||||
* 5.2.3 and earlier don't allow 0 here and return
|
||||
@ -726,7 +804,8 @@ extern LZMA_API(lzma_ret) lzma_stream_decoder_mt(
|
||||
* LZMA_TELL_ANY_CHECK, LZMA_IGNORE_CHECK,
|
||||
* LZMA_CONCATENATED, LZMA_FAIL_FAST
|
||||
*
|
||||
* \return - LZMA_OK: Initialization was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Initialization was successful.
|
||||
* - LZMA_MEM_ERROR: Cannot allocate memory.
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported flags
|
||||
* - LZMA_PROG_ERROR
|
||||
@ -739,18 +818,20 @@ extern LZMA_API(lzma_ret) lzma_auto_decoder(
|
||||
/**
|
||||
* \brief Initialize .lzma decoder (legacy file format)
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* Valid 'action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
|
||||
* There is no need to use LZMA_FINISH, but it's allowed because it may
|
||||
* simplify certain types of applications.
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param memlimit Memory usage limit as bytes. Use UINT64_MAX
|
||||
* to effectively disable the limiter. liblzma
|
||||
* 5.2.3 and earlier don't allow 0 here and return
|
||||
* LZMA_PROG_ERROR; later versions treat 0 as if 1
|
||||
* had been specified.
|
||||
*
|
||||
* Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
|
||||
* There is no need to use LZMA_FINISH, but it's allowed because it may
|
||||
* simplify certain types of applications.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
@ -762,18 +843,6 @@ extern LZMA_API(lzma_ret) lzma_alone_decoder(
|
||||
/**
|
||||
* \brief Initialize .lz (lzip) decoder (a foreign file format)
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param memlimit Memory usage limit as bytes. Use UINT64_MAX
|
||||
* to effectively disable the limiter.
|
||||
* \param flags Bitwise-or of flags, or zero for no flags.
|
||||
* All decoder flags listed above are supported
|
||||
* although only LZMA_CONCATENATED and (in very rare
|
||||
* cases) LZMA_IGNORE_CHECK are actually useful.
|
||||
* LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
|
||||
* and LZMA_FAIL_FAST do nothing. LZMA_TELL_ANY_CHECK
|
||||
* is supported for consistency only as CRC32 is
|
||||
* always used in the .lz format.
|
||||
*
|
||||
* This decoder supports the .lz format version 0 and the unextended .lz
|
||||
* format version 1:
|
||||
*
|
||||
@ -807,7 +876,21 @@ extern LZMA_API(lzma_ret) lzma_alone_decoder(
|
||||
* one should ensure that none of the first four bytes of trailing data are
|
||||
* equal to the magic bytes because lzip >= 1.20 requires it by default.
|
||||
*
|
||||
* \return - LZMA_OK: Initialization was successful.
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param memlimit Memory usage limit as bytes. Use UINT64_MAX
|
||||
* to effectively disable the limiter.
|
||||
* \param flags Bitwise-or of flags, or zero for no flags.
|
||||
* All decoder flags listed above are supported
|
||||
* although only LZMA_CONCATENATED and (in very rare
|
||||
* cases) LZMA_IGNORE_CHECK are actually useful.
|
||||
* LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
|
||||
* and LZMA_FAIL_FAST do nothing. LZMA_TELL_ANY_CHECK
|
||||
* is supported for consistency only as CRC32 is
|
||||
* always used in the .lz format.
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Initialization was successful.
|
||||
* - LZMA_MEM_ERROR: Cannot allocate memory.
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported flags
|
||||
* - LZMA_PROG_ERROR
|
||||
@ -836,13 +919,14 @@ extern LZMA_API(lzma_ret) lzma_lzip_decoder(
|
||||
* *in_pos is updated only if decoding succeeds.
|
||||
* \param in_size Size of the input buffer; the first byte that
|
||||
* won't be read is in[in_size].
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* \param[out] out Beginning of the output buffer
|
||||
* \param[out] out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if decoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
* \return - LZMA_OK: Decoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Decoding was successful.
|
||||
* - LZMA_FORMAT_ERROR
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_DATA_ERROR
|
||||
@ -867,12 +951,13 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
|
||||
/**
|
||||
* \brief MicroLZMA decoder
|
||||
*
|
||||
* See lzma_microlzma_decoder() for more information.
|
||||
* See lzma_microlzma_encoder() for more information.
|
||||
*
|
||||
* The lzma_code() usage with this decoder is completely normal. The
|
||||
* special behavior of lzma_code() applies to lzma_microlzma_encoder() only.
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
* \param comp_size Compressed size of the MicroLZMA stream.
|
||||
* The caller must somehow know this exactly.
|
||||
* \param uncomp_size Uncompressed size of the MicroLZMA stream.
|
||||
@ -897,8 +982,14 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
|
||||
* the implementation in XZ Embedded it doesn't
|
||||
* affect the memory usage if one specifies bigger
|
||||
* dictionary than actually required.)
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_microlzma_decoder(
|
||||
lzma_stream *strm, uint64_t comp_size,
|
||||
uint64_t uncomp_size, lzma_bool uncomp_size_is_exact,
|
||||
uint32_t dict_size);
|
||||
uint32_t dict_size) lzma_nothrow;
|
||||
|
@ -1,15 +1,13 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/delta.h
|
||||
* \brief Delta filter
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -57,7 +55,15 @@ typedef struct {
|
||||
* - 24-bit RGB image data: distance = 3 bytes
|
||||
*/
|
||||
uint32_t dist;
|
||||
|
||||
/**
|
||||
* \brief Minimum value for lzma_options_delta.dist.
|
||||
*/
|
||||
# define LZMA_DELTA_DIST_MIN 1
|
||||
|
||||
/**
|
||||
* \brief Maximum value for lzma_options_delta.dist.
|
||||
*/
|
||||
# define LZMA_DELTA_DIST_MAX 256
|
||||
|
||||
/*
|
||||
@ -67,11 +73,23 @@ typedef struct {
|
||||
* when type is LZMA_DELTA_TYPE_BYTE, so it is safe to leave these
|
||||
* uninitialized.
|
||||
*/
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int4;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr2;
|
||||
|
||||
} lzma_options_delta;
|
||||
|
@ -1,15 +1,13 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/filter.h
|
||||
* \brief Common filter related types and functions
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -29,7 +27,7 @@
|
||||
/**
|
||||
* \brief Filter options
|
||||
*
|
||||
* This structure is used to pass Filter ID and a pointer filter's
|
||||
* This structure is used to pass a Filter ID and a pointer to the filter's
|
||||
* options to liblzma. A few functions work with a single lzma_filter
|
||||
* structure, while most functions expect a filter chain.
|
||||
*
|
||||
@ -37,14 +35,14 @@
|
||||
* The array is terminated with .id = LZMA_VLI_UNKNOWN. Thus, the filter
|
||||
* array must have LZMA_FILTERS_MAX + 1 elements (that is, five) to
|
||||
* be able to hold any arbitrary filter chain. This is important when
|
||||
* using lzma_block_header_decode() from block.h, because too small
|
||||
* array would make liblzma write past the end of the filters array.
|
||||
* using lzma_block_header_decode() from block.h, because a filter array
|
||||
* that is too small would make liblzma write past the end of the array.
|
||||
*/
|
||||
typedef struct {
|
||||
/**
|
||||
* \brief Filter ID
|
||||
*
|
||||
* Use constants whose name begin with `LZMA_FILTER_' to specify
|
||||
* Use constants whose name begin with 'LZMA_FILTER_' to specify
|
||||
* different filters. In an array of lzma_filter structures, use
|
||||
* LZMA_VLI_UNKNOWN to indicate end of filters.
|
||||
*
|
||||
@ -68,12 +66,12 @@ typedef struct {
|
||||
/**
|
||||
* \brief Test if the given Filter ID is supported for encoding
|
||||
*
|
||||
* Return true if the give Filter ID is supported for encoding by this
|
||||
* liblzma build. Otherwise false is returned.
|
||||
* \param id Filter ID
|
||||
*
|
||||
* There is no way to list which filters are available in this particular
|
||||
* liblzma version and build. It would be useless, because the application
|
||||
* couldn't know what kind of options the filter would need.
|
||||
* \return lzma_bool:
|
||||
* - true if the Filter ID is supported for encoding by this
|
||||
* liblzma build.
|
||||
* - false otherwise.
|
||||
*/
|
||||
extern LZMA_API(lzma_bool) lzma_filter_encoder_is_supported(lzma_vli id)
|
||||
lzma_nothrow lzma_attr_const;
|
||||
@ -82,8 +80,12 @@ extern LZMA_API(lzma_bool) lzma_filter_encoder_is_supported(lzma_vli id)
|
||||
/**
|
||||
* \brief Test if the given Filter ID is supported for decoding
|
||||
*
|
||||
* Return true if the give Filter ID is supported for decoding by this
|
||||
* liblzma build. Otherwise false is returned.
|
||||
* \param id Filter ID
|
||||
*
|
||||
* \return lzma_bool:
|
||||
* - true if the Filter ID is supported for decoding by this
|
||||
* liblzma build.
|
||||
* - false otherwise.
|
||||
*/
|
||||
extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id)
|
||||
lzma_nothrow lzma_attr_const;
|
||||
@ -112,7 +114,14 @@ extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id)
|
||||
* array and leave its contents in an undefined state if an error occurs.
|
||||
* liblzma 5.2.7 and newer only modify the dest array when returning LZMA_OK.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \param src Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
* \param[out] dest Destination filter array
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported Filter ID and its options
|
||||
* is not NULL.
|
||||
@ -137,8 +146,13 @@ extern LZMA_API(lzma_ret) lzma_filters_copy(
|
||||
* - options will be set to NULL.
|
||||
* - id will be set to LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* If filters is NULL, this does nothing but remember that this never frees
|
||||
* the filters array itself.
|
||||
* If filters is NULL, this does nothing. Again, this never frees the
|
||||
* filters array itself.
|
||||
*
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*/
|
||||
extern LZMA_API(void) lzma_filters_free(
|
||||
lzma_filter *filters, const lzma_allocator *allocator)
|
||||
@ -156,9 +170,7 @@ extern LZMA_API(void) lzma_filters_free(
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* \return Number of bytes of memory required for the given
|
||||
* filter chain when encoding. If an error occurs,
|
||||
* for example due to unsupported filter chain,
|
||||
* UINT64_MAX is returned.
|
||||
* filter chain when encoding or UINT64_MAX on error.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -175,9 +187,7 @@ extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* \return Number of bytes of memory required for the given
|
||||
* filter chain when decoding. If an error occurs,
|
||||
* for example due to unsupported filter chain,
|
||||
* UINT64_MAX is returned.
|
||||
* filter chain when decoding or UINT64_MAX on error.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -188,14 +198,16 @@ extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters)
|
||||
*
|
||||
* This function may be useful when implementing custom file formats.
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param filters Array of lzma_filter structures. The end of the
|
||||
* array must be marked with .id = LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* The `action' with lzma_code() can be LZMA_RUN, LZMA_SYNC_FLUSH (if the
|
||||
* The 'action' with lzma_code() can be LZMA_RUN, LZMA_SYNC_FLUSH (if the
|
||||
* filter chain supports it), or LZMA_FINISH.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \param strm Pointer to lzma_stream that is at least
|
||||
* initialized with LZMA_STREAM_INIT.
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
@ -210,10 +222,16 @@ extern LZMA_API(lzma_ret) lzma_raw_encoder(
|
||||
*
|
||||
* The initialization of raw decoder goes similarly to raw encoder.
|
||||
*
|
||||
* The `action' with lzma_code() can be LZMA_RUN or LZMA_FINISH. Using
|
||||
* The 'action' with lzma_code() can be LZMA_RUN or LZMA_FINISH. Using
|
||||
* LZMA_FINISH is not required, it is supported just for convenience.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \param strm Pointer to lzma_stream that is at least
|
||||
* initialized with LZMA_STREAM_INIT.
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
@ -235,7 +253,7 @@ extern LZMA_API(lzma_ret) lzma_raw_decoder(
|
||||
* chain to be used for the next Block(s).
|
||||
*
|
||||
* - After LZMA_SYNC_FLUSH: Raw encoder (lzma_raw_encoder()),
|
||||
* Block encocder (lzma_block_encoder()), and single-threaded .xz Stream
|
||||
* Block encoder (lzma_block_encoder()), and single-threaded .xz Stream
|
||||
* encoder (lzma_stream_encoder()) allow changing certain filter-specific
|
||||
* options in the middle of encoding. The actual filters in the chain
|
||||
* (Filter IDs) must not be changed! Currently only the lc, lp, and pb
|
||||
@ -249,7 +267,13 @@ extern LZMA_API(lzma_ret) lzma_raw_decoder(
|
||||
* as if LZMA_FULL_FLUSH (Stream encoders) or LZMA_SYNC_FLUSH (Raw or Block
|
||||
* encoder) had been used right before calling this function.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \param strm Pointer to lzma_stream that is at least
|
||||
* initialized with LZMA_STREAM_INIT.
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_MEMLIMIT_ERROR
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
@ -262,29 +286,30 @@ extern LZMA_API(lzma_ret) lzma_filters_update(
|
||||
/**
|
||||
* \brief Single-call raw encoder
|
||||
*
|
||||
* \param filters Array of lzma_filter structures. The end of the
|
||||
* array must be marked with .id = LZMA_VLI_UNKNOWN.
|
||||
* \note There is no function to calculate how big output buffer
|
||||
* would surely be big enough. (lzma_stream_buffer_bound()
|
||||
* works only for lzma_stream_buffer_encode(); raw encoder
|
||||
* won't necessarily meet that bound.)
|
||||
*
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
* \param in Beginning of the input buffer
|
||||
* \param in_size Size of the input buffer
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* \param[out] out Beginning of the output buffer
|
||||
* \param[out] out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if encoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_BUF_ERROR: Not enough output buffer space.
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_DATA_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*
|
||||
* \note There is no function to calculate how big output buffer
|
||||
* would surely be big enough. (lzma_stream_buffer_bound()
|
||||
* works only for lzma_stream_buffer_encode(); raw encoder
|
||||
* won't necessarily meet that bound.)
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
|
||||
const lzma_filter *filters, const lzma_allocator *allocator,
|
||||
@ -295,8 +320,8 @@ extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
|
||||
/**
|
||||
* \brief Single-call raw decoder
|
||||
*
|
||||
* \param filters Array of lzma_filter structures. The end of the
|
||||
* array must be marked with .id = LZMA_VLI_UNKNOWN.
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
* \param in Beginning of the input buffer
|
||||
@ -304,11 +329,19 @@ extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
|
||||
* *in_pos is updated only if decoding succeeds.
|
||||
* \param in_size Size of the input buffer; the first byte that
|
||||
* won't be read is in[in_size].
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* \param[out] out Beginning of the output buffer
|
||||
* \param[out] out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if encoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Decoding was successful.
|
||||
* - LZMA_BUF_ERROR: Not enough output buffer space.
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_DATA_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_raw_buffer_decode(
|
||||
const lzma_filter *filters, const lzma_allocator *allocator,
|
||||
@ -322,18 +355,19 @@ extern LZMA_API(lzma_ret) lzma_raw_buffer_decode(
|
||||
* This function may be useful when implementing custom file formats
|
||||
* using the raw encoder and decoder.
|
||||
*
|
||||
* \param size Pointer to uint32_t to hold the size of the properties
|
||||
* \param filter Filter ID and options (the size of the properties may
|
||||
* vary depending on the options)
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*
|
||||
* \note This function validates the Filter ID, but does not
|
||||
* necessarily validate the options. Thus, it is possible
|
||||
* that this returns LZMA_OK while the following call to
|
||||
* lzma_properties_encode() returns LZMA_OPTIONS_ERROR.
|
||||
*
|
||||
* \param[out] size Pointer to uint32_t to hold the size of the properties
|
||||
* \param filter Filter ID and options (the size of the properties may
|
||||
* vary depending on the options)
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_properties_size(
|
||||
uint32_t *size, const lzma_filter *filter) lzma_nothrow;
|
||||
@ -342,15 +376,6 @@ extern LZMA_API(lzma_ret) lzma_properties_size(
|
||||
/**
|
||||
* \brief Encode the Filter Properties field
|
||||
*
|
||||
* \param filter Filter ID and options
|
||||
* \param props Buffer to hold the encoded options. The size of
|
||||
* buffer must have been already determined with
|
||||
* lzma_properties_size().
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*
|
||||
* \note Even this function won't validate more options than actually
|
||||
* necessary. Thus, it is possible that encoding the properties
|
||||
* succeeds but using the same options to initialize the encoder
|
||||
@ -360,6 +385,15 @@ extern LZMA_API(lzma_ret) lzma_properties_size(
|
||||
* of the Filter Properties field is zero, calling
|
||||
* lzma_properties_encode() is not required, but it
|
||||
* won't do any harm either.
|
||||
*
|
||||
* \param filter Filter ID and options
|
||||
* \param[out] props Buffer to hold the encoded options. The size of
|
||||
* the buffer must have been already determined with
|
||||
* lzma_properties_size().
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_properties_encode(
|
||||
const lzma_filter *filter, uint8_t *props) lzma_nothrow;
|
||||
@ -375,15 +409,16 @@ extern LZMA_API(lzma_ret) lzma_properties_encode(
|
||||
* it's application's responsibility to free it when
|
||||
* appropriate. filter->options is set to NULL if
|
||||
* there are no properties or if an error occurs.
|
||||
* \param allocator Custom memory allocator used to allocate the
|
||||
* options. Set to NULL to use the default malloc(),
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
* and in case of an error, also free().
|
||||
* \param props Input buffer containing the properties.
|
||||
* \param props_size Size of the properties. This must be the exact
|
||||
* size; giving too much or too little input will
|
||||
* return LZMA_OPTIONS_ERROR.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
*/
|
||||
@ -398,18 +433,19 @@ extern LZMA_API(lzma_ret) lzma_properties_decode(
|
||||
* Knowing the size of Filter Flags is useful to know when allocating
|
||||
* memory to hold the encoded Filter Flags.
|
||||
*
|
||||
* \param size Pointer to integer to hold the calculated size
|
||||
* \note If you need to calculate size of List of Filter Flags,
|
||||
* you need to loop over every lzma_filter entry.
|
||||
*
|
||||
* \param[out] size Pointer to integer to hold the calculated size
|
||||
* \param filter Filter ID and associated options whose encoded
|
||||
* size is to be calculated
|
||||
*
|
||||
* \return - LZMA_OK: *size set successfully. Note that this doesn't
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: *size set successfully. Note that this doesn't
|
||||
* guarantee that filter->options is valid, thus
|
||||
* lzma_filter_flags_encode() may still fail.
|
||||
* - LZMA_OPTIONS_ERROR: Unknown Filter ID or unsupported options.
|
||||
* - LZMA_PROG_ERROR: Invalid options
|
||||
*
|
||||
* \note If you need to calculate size of List of Filter Flags,
|
||||
* you need to loop over every lzma_filter entry.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_filter_flags_size(
|
||||
uint32_t *size, const lzma_filter *filter)
|
||||
@ -423,12 +459,13 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_size(
|
||||
* This is due to how this function is used internally by liblzma.
|
||||
*
|
||||
* \param filter Filter ID and options to be encoded
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos out[*out_pos] is the next write position. This
|
||||
* \param[out] out Beginning of the output buffer
|
||||
* \param[out] out_pos out[*out_pos] is the next write position. This
|
||||
* is updated by the encoder.
|
||||
* \param out_size out[out_size] is the first byte to not write.
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_OPTIONS_ERROR: Invalid or unsupported options.
|
||||
* - LZMA_PROG_ERROR: Invalid options or not enough output
|
||||
* buffer space (you should have checked it with
|
||||
@ -443,11 +480,26 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filter,
|
||||
* \brief Decode Filter Flags from given buffer
|
||||
*
|
||||
* The decoded result is stored into *filter. The old value of
|
||||
* filter->options is not free()d.
|
||||
* filter->options is not free()d. If anything other than LZMA_OK
|
||||
* is returned, filter->options is set to NULL.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \param[out] filter Destination filter. The decoded Filter ID will
|
||||
* be stored in filter->id. If options are needed
|
||||
* they will be allocated and the pointer will be
|
||||
* stored in filter->options.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
* \param in Beginning of the input buffer
|
||||
* \param[out] in_pos The next byte will be read from in[*in_pos].
|
||||
* *in_pos is updated only if decoding succeeds.
|
||||
* \param in_size Size of the input buffer; the first byte that
|
||||
* won't be read is in[in_size].
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_DATA_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_filter_flags_decode(
|
||||
@ -474,8 +526,9 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_decode(
|
||||
*
|
||||
* By default lzma_str_to_filters() can return an error if the filter chain
|
||||
* as a whole isn't usable in the .xz format or in the raw encoder or decoder.
|
||||
* With this flag the validation is skipped (this doesn't affect the handling
|
||||
* of the individual filter options).
|
||||
* With this flag, this validation is skipped. This flag doesn't affect the
|
||||
* handling of the individual filter options. To allow non-.xz filters also
|
||||
* LZMA_STR_ALL_FILTERS is needed.
|
||||
*/
|
||||
#define LZMA_STR_NO_VALIDATION UINT32_C(0x02)
|
||||
|
||||
@ -573,34 +626,6 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_decode(
|
||||
* lzma_str_list_filters(). See the xz man page for the description
|
||||
* of filter names and options.
|
||||
*
|
||||
* \param str User-supplied string describing a preset or
|
||||
* a filter chain. If a default value is needed and
|
||||
* you don't know what would be good, use "6" since
|
||||
* that is the default preset in xz too.
|
||||
* \param error_pos If this isn't NULL, this value will be set on
|
||||
* both success and on all errors. This tells the
|
||||
* location of the error in the string. This is
|
||||
* an int to make it straightforward to use this
|
||||
* as printf() field width. The value is guaranteed
|
||||
* to be in the range [0, INT_MAX] even if strlen(str)
|
||||
* somehow was greater than INT_MAX.
|
||||
* \param filters An array of lzma_filter structures. There must
|
||||
* be LZMA_FILTERS_MAX + 1 (that is, five) elements
|
||||
* in the array. The old contents are ignored so it
|
||||
* doesn't need to be initialized. This array is
|
||||
* modified only if this function returns LZMA_OK.
|
||||
* Once the allocated filter options are no longer
|
||||
* needed, lzma_filters_free() can be used to free the
|
||||
* options (it doesn't free the filters array itself).
|
||||
* \param flags Bitwise-or of zero or more of the flags
|
||||
* LZMA_STR_ALL_FILTERS and LZMA_STR_NO_VALIDATION.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*
|
||||
* \return On success, NULL is returned. On error, a statically-allocated
|
||||
* error message is returned which together with the error_pos
|
||||
* should give some idea what is wrong.
|
||||
*
|
||||
* For command line applications, below is an example how an error message
|
||||
* can be displayed. Note the use of an empty string for the field width.
|
||||
* If "^" was used there it would create an off-by-one error except at
|
||||
@ -618,6 +643,34 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_decode(
|
||||
* printf("%s: %s\n", argv[0], msg);
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
* \param str User-supplied string describing a preset or
|
||||
* a filter chain. If a default value is needed and
|
||||
* you don't know what would be good, use "6" since
|
||||
* that is the default preset in xz too.
|
||||
* \param[out] error_pos If this isn't NULL, this value will be set on
|
||||
* both success and on all errors. This tells the
|
||||
* location of the error in the string. This is
|
||||
* an int to make it straightforward to use this
|
||||
* as printf() field width. The value is guaranteed
|
||||
* to be in the range [0, INT_MAX] even if strlen(str)
|
||||
* somehow was greater than INT_MAX.
|
||||
* \param[out] filters An array of lzma_filter structures. There must
|
||||
* be LZMA_FILTERS_MAX + 1 (that is, five) elements
|
||||
* in the array. The old contents are ignored so it
|
||||
* doesn't need to be initialized. This array is
|
||||
* modified only if this function returns NULL.
|
||||
* Once the allocated filter options are no longer
|
||||
* needed, lzma_filters_free() can be used to free the
|
||||
* options (it doesn't free the filters array itself).
|
||||
* \param flags Bitwise-or of zero or more of the flags
|
||||
* LZMA_STR_ALL_FILTERS and LZMA_STR_NO_VALIDATION.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*
|
||||
* \return On success, NULL is returned. On error, a statically-allocated
|
||||
* error message is returned which together with the error_pos
|
||||
* should give some idea what is wrong.
|
||||
*/
|
||||
extern LZMA_API(const char *) lzma_str_to_filters(
|
||||
const char *str, int *error_pos, lzma_filter *filters,
|
||||
@ -646,19 +699,20 @@ extern LZMA_API(const char *) lzma_str_to_filters(
|
||||
* specify "6" to lzma_str_to_filters() then lzma_str_from_filters()
|
||||
* will produce a string containing "lzma2".
|
||||
*
|
||||
* \param str On success *str will be set to point to an
|
||||
* \param[out] str On success *str will be set to point to an
|
||||
* allocated string describing the given filter
|
||||
* chain. Old value is ignored. On error *str is
|
||||
* always set to NULL.
|
||||
* \param filters Array of 1-4 filters and a terminating element
|
||||
* with .id = LZMA_VLI_UNKNOWN.
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
* \param flags Bitwise-or of zero or more of the flags
|
||||
* LZMA_STR_ENCODER, LZMA_STR_DECODER,
|
||||
* LZMA_STR_GETOPT_LONG, and LZMA_STR_NO_SPACES.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_OPTIONS_ERROR: Empty filter chain
|
||||
* (filters[0].id == LZMA_VLI_UNKNOWN) or the filter chain
|
||||
* includes a Filter ID that is not supported by this function.
|
||||
@ -676,7 +730,7 @@ extern LZMA_API(lzma_ret) lzma_str_from_filters(
|
||||
*
|
||||
* If a filter_id is given then only one line is created which contains the
|
||||
* filter name. If LZMA_STR_ENCODER or LZMA_STR_DECODER is used then the
|
||||
* options required for encoding or decoding are listed on the same line too.
|
||||
* options read by the encoder or decoder are printed on the same line.
|
||||
*
|
||||
* If filter_id is LZMA_VLI_UNKNOWN then all supported .xz-compatible filters
|
||||
* are listed:
|
||||
@ -687,7 +741,7 @@ extern LZMA_API(lzma_ret) lzma_str_from_filters(
|
||||
*
|
||||
* - If LZMA_STR_ENCODER or LZMA_STR_DECODER is used then filters and
|
||||
* the supported options are listed one filter per line. There won't
|
||||
* be a '\n' after the last filter.
|
||||
* be a newline after the last filter.
|
||||
*
|
||||
* - If LZMA_STR_ALL_FILTERS is used then the list will include also
|
||||
* those filters that cannot be used in the .xz format (LZMA1).
|
||||
@ -703,7 +757,8 @@ extern LZMA_API(lzma_ret) lzma_str_from_filters(
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported filter_id or flags
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
|
@ -1,6 +1,9 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/hardware.h
|
||||
* \brief Hardware information
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*
|
||||
* Since liblzma can consume a lot of system resources, it also provides
|
||||
* ways to limit the resource usage. Applications linking against liblzma
|
||||
@ -22,11 +25,6 @@
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
|
@ -1,15 +1,13 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/index.h
|
||||
* \brief Handling of .xz Index and related information
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -50,8 +48,13 @@ typedef struct {
|
||||
*/
|
||||
const lzma_stream_flags *flags;
|
||||
|
||||
/** \private Reserved member. */
|
||||
const void *reserved_ptr1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
const void *reserved_ptr2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
const void *reserved_ptr3;
|
||||
|
||||
/**
|
||||
@ -107,9 +110,17 @@ typedef struct {
|
||||
*/
|
||||
lzma_vli padding;
|
||||
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_vli1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_vli2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_vli3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_vli4;
|
||||
} stream;
|
||||
|
||||
@ -196,25 +207,46 @@ typedef struct {
|
||||
*/
|
||||
lzma_vli total_size;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_vli1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_vli2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_vli3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_vli reserved_vli4;
|
||||
|
||||
/** \private Reserved member. */
|
||||
const void *reserved_ptr1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
const void *reserved_ptr2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
const void *reserved_ptr3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
const void *reserved_ptr4;
|
||||
} block;
|
||||
|
||||
/*
|
||||
/**
|
||||
* \private Internal struct.
|
||||
*
|
||||
* Internal data which is used to store the state of the iterator.
|
||||
* The exact format may vary between liblzma versions, so don't
|
||||
* touch these in any way.
|
||||
*/
|
||||
union {
|
||||
/** \private Internal member. */
|
||||
const void *p;
|
||||
|
||||
/** \private Internal member. */
|
||||
size_t s;
|
||||
|
||||
/** \private Internal member. */
|
||||
lzma_vli v;
|
||||
} internal[6];
|
||||
} lzma_index_iter;
|
||||
@ -268,20 +300,47 @@ typedef enum {
|
||||
} lzma_index_iter_mode;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Mask for return value from lzma_index_checks() for check none
|
||||
*
|
||||
* \note This and the other CHECK_MASK macros were added in 5.5.1alpha.
|
||||
*/
|
||||
#define LZMA_INDEX_CHECK_MASK_NONE (UINT32_C(1) << LZMA_CHECK_NONE)
|
||||
|
||||
/**
|
||||
* \brief Mask for return value from lzma_index_checks() for check CRC32
|
||||
*/
|
||||
#define LZMA_INDEX_CHECK_MASK_CRC32 (UINT32_C(1) << LZMA_CHECK_CRC32)
|
||||
|
||||
/**
|
||||
* \brief Mask for return value from lzma_index_checks() for check CRC64
|
||||
*/
|
||||
#define LZMA_INDEX_CHECK_MASK_CRC64 (UINT32_C(1) << LZMA_CHECK_CRC64)
|
||||
|
||||
/**
|
||||
* \brief Mask for return value from lzma_index_checks() for check SHA256
|
||||
*/
|
||||
#define LZMA_INDEX_CHECK_MASK_SHA256 (UINT32_C(1) << LZMA_CHECK_SHA256)
|
||||
|
||||
/**
|
||||
* \brief Calculate memory usage of lzma_index
|
||||
*
|
||||
* On disk, the size of the Index field depends on both the number of Records
|
||||
* stored and how big values the Records store (due to variable-length integer
|
||||
* stored and the size of the Records (due to variable-length integer
|
||||
* encoding). When the Index is kept in lzma_index structure, the memory usage
|
||||
* depends only on the number of Records/Blocks stored in the Index(es), and
|
||||
* in case of concatenated lzma_indexes, the number of Streams. The size in
|
||||
* RAM is almost always significantly bigger than in the encoded form on disk.
|
||||
*
|
||||
* This function calculates an approximate amount of memory needed hold
|
||||
* This function calculates an approximate amount of memory needed to hold
|
||||
* the given number of Streams and Blocks in lzma_index structure. This
|
||||
* value may vary between CPU architectures and also between liblzma versions
|
||||
* if the internal implementation is modified.
|
||||
*
|
||||
* \param streams Number of Streams
|
||||
* \param blocks Number of Blocks
|
||||
*
|
||||
* \return Approximate memory in bytes needed in a lzma_index structure.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_index_memusage(
|
||||
lzma_vli streams, lzma_vli blocks) lzma_nothrow;
|
||||
@ -292,6 +351,10 @@ extern LZMA_API(uint64_t) lzma_index_memusage(
|
||||
*
|
||||
* This is a shorthand for lzma_index_memusage(lzma_index_stream_count(i),
|
||||
* lzma_index_block_count(i)).
|
||||
*
|
||||
* \param i Pointer to lzma_index structure
|
||||
*
|
||||
* \return Approximate memory in bytes used by the lzma_index structure.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i)
|
||||
lzma_nothrow;
|
||||
@ -300,6 +363,9 @@ extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i)
|
||||
/**
|
||||
* \brief Allocate and initialize a new lzma_index structure
|
||||
*
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*
|
||||
* \return On success, a pointer to an empty initialized lzma_index is
|
||||
* returned. If allocation fails, NULL is returned.
|
||||
*/
|
||||
@ -311,6 +377,10 @@ extern LZMA_API(lzma_index *) lzma_index_init(const lzma_allocator *allocator)
|
||||
* \brief Deallocate lzma_index
|
||||
*
|
||||
* If i is NULL, this does nothing.
|
||||
*
|
||||
* \param i Pointer to lzma_index structure to deallocate
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*/
|
||||
extern LZMA_API(void) lzma_index_end(
|
||||
lzma_index *i, const lzma_allocator *allocator) lzma_nothrow;
|
||||
@ -320,8 +390,9 @@ extern LZMA_API(void) lzma_index_end(
|
||||
* \brief Add a new Block to lzma_index
|
||||
*
|
||||
* \param i Pointer to a lzma_index structure
|
||||
* \param allocator Pointer to lzma_allocator, or NULL to
|
||||
* use malloc()
|
||||
* \param allocator lzma_allocator for custom allocator
|
||||
* functions. Set to NULL to use malloc()
|
||||
* and free().
|
||||
* \param unpadded_size Unpadded Size of a Block. This can be
|
||||
* calculated with lzma_block_unpadded_size()
|
||||
* after encoding or decoding the Block.
|
||||
@ -334,7 +405,8 @@ extern LZMA_API(void) lzma_index_end(
|
||||
* lzma_index_append() it is possible to read the next Block with
|
||||
* an existing iterator.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_DATA_ERROR: Compressed or uncompressed size of the
|
||||
* Stream or size of the Index field would grow too big.
|
||||
@ -354,11 +426,15 @@ extern LZMA_API(lzma_ret) lzma_index_append(
|
||||
* lzma_index, because to decode Blocks, knowing the integrity check type
|
||||
* is needed.
|
||||
*
|
||||
* The given Stream Flags are copied into internal preallocated structure
|
||||
* in the lzma_index, thus the caller doesn't need to keep the *stream_flags
|
||||
* available after calling this function.
|
||||
* \param i Pointer to lzma_index structure
|
||||
* \param stream_flags Pointer to lzma_stream_flags structure. This
|
||||
* is copied into the internal preallocated
|
||||
* structure, so the caller doesn't need to keep
|
||||
* the flags' data available after calling this
|
||||
* function.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported stream_flags->version.
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
@ -376,6 +452,11 @@ extern LZMA_API(lzma_ret) lzma_index_stream_flags(
|
||||
* showing the Check types to the user.
|
||||
*
|
||||
* The bitmask is 1 << check_id, e.g. CRC32 is 1 << 1 and SHA-256 is 1 << 10.
|
||||
* These masks are defined for convenience as LZMA_INDEX_CHECK_MASK_XXX
|
||||
*
|
||||
* \param i Pointer to lzma_index structure
|
||||
*
|
||||
* \return Bitmask indicating which Check types are used in the lzma_index
|
||||
*/
|
||||
extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -390,7 +471,8 @@ extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i)
|
||||
*
|
||||
* By default, the amount of Stream Padding is assumed to be zero bytes.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_DATA_ERROR: The file size would grow too big.
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
@ -401,6 +483,10 @@ extern LZMA_API(lzma_ret) lzma_index_stream_padding(
|
||||
|
||||
/**
|
||||
* \brief Get the number of Streams
|
||||
*
|
||||
* \param i Pointer to lzma_index structure
|
||||
*
|
||||
* \return Number of Streams in the lzma_index
|
||||
*/
|
||||
extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -411,6 +497,10 @@ extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i)
|
||||
*
|
||||
* This returns the total number of Blocks in lzma_index. To get number
|
||||
* of Blocks in individual Streams, use lzma_index_iter.
|
||||
*
|
||||
* \param i Pointer to lzma_index structure
|
||||
*
|
||||
* \return Number of blocks in the lzma_index
|
||||
*/
|
||||
extern LZMA_API(lzma_vli) lzma_index_block_count(const lzma_index *i)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -420,6 +510,10 @@ extern LZMA_API(lzma_vli) lzma_index_block_count(const lzma_index *i)
|
||||
* \brief Get the size of the Index field as bytes
|
||||
*
|
||||
* This is needed to verify the Backward Size field in the Stream Footer.
|
||||
*
|
||||
* \param i Pointer to lzma_index structure
|
||||
*
|
||||
* \return Size in bytes of the Index
|
||||
*/
|
||||
extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -431,6 +525,11 @@ extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i)
|
||||
* If multiple lzma_indexes have been combined, this works as if the Blocks
|
||||
* were in a single Stream. This is useful if you are going to combine
|
||||
* Blocks from multiple Streams into a single new Stream.
|
||||
*
|
||||
* \param i Pointer to lzma_index structure
|
||||
*
|
||||
* \return Size in bytes of the Stream (if all Blocks are combined
|
||||
* into one Stream).
|
||||
*/
|
||||
extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -441,6 +540,10 @@ extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
|
||||
*
|
||||
* This doesn't include the Stream Header, Stream Footer, Stream Padding,
|
||||
* or Index fields.
|
||||
*
|
||||
* \param i Pointer to lzma_index structure
|
||||
*
|
||||
* \return Size in bytes of all Blocks in the Stream(s)
|
||||
*/
|
||||
extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -453,6 +556,10 @@ extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
|
||||
* no Stream Padding, this function is identical to lzma_index_stream_size().
|
||||
* If multiple lzma_indexes have been combined, this includes also the headers
|
||||
* of each separate Stream and the possible Stream Padding fields.
|
||||
*
|
||||
* \param i Pointer to lzma_index structure
|
||||
*
|
||||
* \return Total size of the .xz file in bytes
|
||||
*/
|
||||
extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -460,6 +567,10 @@ extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i)
|
||||
|
||||
/**
|
||||
* \brief Get the uncompressed size of the file
|
||||
*
|
||||
* \param i Pointer to lzma_index structure
|
||||
*
|
||||
* \return Size in bytes of the uncompressed data in the file
|
||||
*/
|
||||
extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@ -468,9 +579,6 @@ extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
|
||||
/**
|
||||
* \brief Initialize an iterator
|
||||
*
|
||||
* \param iter Pointer to a lzma_index_iter structure
|
||||
* \param i lzma_index to which the iterator will be associated
|
||||
*
|
||||
* This function associates the iterator with the given lzma_index, and calls
|
||||
* lzma_index_iter_rewind() on the iterator.
|
||||
*
|
||||
@ -483,6 +591,9 @@ extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
|
||||
*
|
||||
* It is safe to make copies of an initialized lzma_index_iter, for example,
|
||||
* to easily restart reading at some particular position.
|
||||
*
|
||||
* \param iter Pointer to a lzma_index_iter structure
|
||||
* \param i lzma_index to which the iterator will be associated
|
||||
*/
|
||||
extern LZMA_API(void) lzma_index_iter_init(
|
||||
lzma_index_iter *iter, const lzma_index *i) lzma_nothrow;
|
||||
@ -493,6 +604,8 @@ extern LZMA_API(void) lzma_index_iter_init(
|
||||
*
|
||||
* Rewind the iterator so that next call to lzma_index_iter_next() will
|
||||
* return the first Block or Stream.
|
||||
*
|
||||
* \param iter Pointer to a lzma_index_iter structure
|
||||
*/
|
||||
extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter)
|
||||
lzma_nothrow;
|
||||
@ -505,11 +618,11 @@ extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter)
|
||||
* \param mode Specify what kind of information the caller wants
|
||||
* to get. See lzma_index_iter_mode for details.
|
||||
*
|
||||
* \return If next Block or Stream matching the mode was found, *iter
|
||||
* is updated and this function returns false. If no Block or
|
||||
* Stream matching the mode is found, *iter is not modified
|
||||
* and this function returns true. If mode is set to an unknown
|
||||
* value, *iter is not modified and this function returns true.
|
||||
* \return lzma_bool:
|
||||
* - true if no Block or Stream matching the mode is found.
|
||||
* *iter is not updated (failure).
|
||||
* - false if the next Block or Stream matching the mode was
|
||||
* found. *iter is updated (success).
|
||||
*/
|
||||
extern LZMA_API(lzma_bool) lzma_index_iter_next(
|
||||
lzma_index_iter *iter, lzma_index_iter_mode mode)
|
||||
@ -523,21 +636,26 @@ extern LZMA_API(lzma_bool) lzma_index_iter_next(
|
||||
* the Index field(s) and use lzma_index_iter_locate() to do random-access
|
||||
* reading with granularity of Block size.
|
||||
*
|
||||
* \param iter Iterator that was earlier initialized with
|
||||
* lzma_index_iter_init().
|
||||
* \param target Uncompressed target offset which the caller would
|
||||
* like to locate from the Stream
|
||||
*
|
||||
* If the target is smaller than the uncompressed size of the Stream (can be
|
||||
* checked with lzma_index_uncompressed_size()):
|
||||
* - Information about the Stream and Block containing the requested
|
||||
* uncompressed offset is stored into *iter.
|
||||
* - Internal state of the iterator is adjusted so that
|
||||
* lzma_index_iter_next() can be used to read subsequent Blocks or Streams.
|
||||
* - This function returns false.
|
||||
*
|
||||
* If target is greater than the uncompressed size of the Stream, *iter
|
||||
* is not modified, and this function returns true.
|
||||
* If the target is greater than the uncompressed size of the Stream, *iter
|
||||
* is not modified.
|
||||
*
|
||||
* \param iter Iterator that was earlier initialized with
|
||||
* lzma_index_iter_init().
|
||||
* \param target Uncompressed target offset which the caller would
|
||||
* like to locate from the Stream
|
||||
*
|
||||
* \return lzma_bool:
|
||||
* - true if the target is greater than or equal to the
|
||||
* uncompressed size of the Stream (failure)
|
||||
* - false if the target is smaller than the uncompressed size
|
||||
* of the Stream (success)
|
||||
*/
|
||||
extern LZMA_API(lzma_bool) lzma_index_iter_locate(
|
||||
lzma_index_iter *iter, lzma_vli target) lzma_nothrow;
|
||||
@ -550,15 +668,16 @@ extern LZMA_API(lzma_bool) lzma_index_iter_locate(
|
||||
* multi-Stream .xz file, or when combining multiple Streams into single
|
||||
* Stream.
|
||||
*
|
||||
* \param dest lzma_index after which src is appended
|
||||
* \param[out] dest lzma_index after which src is appended
|
||||
* \param src lzma_index to be appended after dest. If this
|
||||
* function succeeds, the memory allocated for src
|
||||
* is freed or moved to be part of dest, and all
|
||||
* iterators pointing to src will become invalid.
|
||||
* \param allocator Custom memory allocator; can be NULL to use
|
||||
* malloc() and free().
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*
|
||||
* \return - LZMA_OK: lzma_indexes were concatenated successfully.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: lzma_indexes were concatenated successfully.
|
||||
* src is now a dangling pointer.
|
||||
* - LZMA_DATA_ERROR: *dest would grow too big.
|
||||
* - LZMA_MEM_ERROR
|
||||
@ -572,6 +691,10 @@ extern LZMA_API(lzma_ret) lzma_index_cat(lzma_index *dest, lzma_index *src,
|
||||
/**
|
||||
* \brief Duplicate lzma_index
|
||||
*
|
||||
* \param i Pointer to lzma_index structure to be duplicated
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*
|
||||
* \return A copy of the lzma_index, or NULL if memory allocation failed.
|
||||
*/
|
||||
extern LZMA_API(lzma_index *) lzma_index_dup(
|
||||
@ -585,10 +708,11 @@ extern LZMA_API(lzma_index *) lzma_index_dup(
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param i Pointer to lzma_index which should be encoded.
|
||||
*
|
||||
* The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
|
||||
* The valid 'action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
|
||||
* It is enough to use only one of them (you can choose freely).
|
||||
*
|
||||
* \return - LZMA_OK: Initialization succeeded, continue with lzma_code().
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Initialization succeeded, continue with lzma_code().
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
@ -601,7 +725,7 @@ extern LZMA_API(lzma_ret) lzma_index_encoder(
|
||||
* \brief Initialize .xz Index decoder
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param i The decoded Index will be made available via
|
||||
* \param[out] i The decoded Index will be made available via
|
||||
* this pointer. Initially this function will
|
||||
* set *i to NULL (the old value is ignored). If
|
||||
* decoding succeeds (lzma_code() returns
|
||||
@ -613,15 +737,16 @@ extern LZMA_API(lzma_ret) lzma_index_encoder(
|
||||
* don't allow 0 here and return LZMA_PROG_ERROR;
|
||||
* later versions treat 0 as if 1 had been specified.
|
||||
*
|
||||
* Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
|
||||
* Valid 'action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
|
||||
* There is no need to use LZMA_FINISH, but it's allowed because it may
|
||||
* simplify certain types of applications.
|
||||
*
|
||||
* \return - LZMA_OK: Initialization succeeded, continue with lzma_code().
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Initialization succeeded, continue with lzma_code().
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*
|
||||
* liblzma 5.2.3 and older list also LZMA_MEMLIMIT_ERROR here
|
||||
* \note liblzma 5.2.3 and older list also LZMA_MEMLIMIT_ERROR here
|
||||
* but that error code has never been possible from this
|
||||
* initialization function.
|
||||
*/
|
||||
@ -633,21 +758,23 @@ extern LZMA_API(lzma_ret) lzma_index_decoder(
|
||||
/**
|
||||
* \brief Single-call .xz Index encoder
|
||||
*
|
||||
* \note This function doesn't take allocator argument since all
|
||||
* the internal data is allocated on stack.
|
||||
*
|
||||
* \param i lzma_index to be encoded
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* \param[out] out Beginning of the output buffer
|
||||
* \param[out] out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if encoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_BUF_ERROR: Output buffer is too small. Use
|
||||
* lzma_index_size() to find out how much output
|
||||
* space is needed.
|
||||
* - LZMA_PROG_ERROR
|
||||
*
|
||||
* \note This function doesn't take allocator argument since all
|
||||
* the internal data is allocated on stack.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
|
||||
@ -656,24 +783,26 @@ extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i,
|
||||
/**
|
||||
* \brief Single-call .xz Index decoder
|
||||
*
|
||||
* \param i If decoding succeeds, *i will point to a new
|
||||
* \param[out] i If decoding succeeds, *i will point to a new
|
||||
* lzma_index, which the application has to
|
||||
* later free with lzma_index_end(). If an error
|
||||
* occurs, *i will be NULL. The old value of *i
|
||||
* is always ignored and thus doesn't need to be
|
||||
* initialized by the caller.
|
||||
* \param memlimit Pointer to how much memory the resulting
|
||||
* \param[out] memlimit Pointer to how much memory the resulting
|
||||
* lzma_index is allowed to require. The value
|
||||
* pointed by this pointer is modified if and only
|
||||
* if LZMA_MEMLIMIT_ERROR is returned.
|
||||
* \param allocator Pointer to lzma_allocator, or NULL to use malloc()
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
* \param in Beginning of the input buffer
|
||||
* \param in_pos The next byte will be read from in[*in_pos].
|
||||
* *in_pos is updated only if decoding succeeds.
|
||||
* \param in_size Size of the input buffer; the first byte that
|
||||
* won't be read is in[in_size].
|
||||
*
|
||||
* \return - LZMA_OK: Decoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Decoding was successful.
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
|
||||
* The minimum required memlimit value was stored to *memlimit.
|
||||
@ -689,15 +818,6 @@ extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
|
||||
/**
|
||||
* \brief Initialize a .xz file information decoder
|
||||
*
|
||||
* \param strm Pointer to a properly prepared lzma_stream
|
||||
* \param dest_index Pointer to a pointer where the decoder will put
|
||||
* the decoded lzma_index. The old value
|
||||
* of *dest_index is ignored (not freed).
|
||||
* \param memlimit How much memory the resulting lzma_index is
|
||||
* allowed to require. Use UINT64_MAX to
|
||||
* effectively disable the limiter.
|
||||
* \param file_size Size of the input .xz file
|
||||
*
|
||||
* This decoder decodes the Stream Header, Stream Footer, Index, and
|
||||
* Stream Padding field(s) from the input .xz file and stores the resulting
|
||||
* combined index in *dest_index. This information can be used to get the
|
||||
@ -721,10 +841,10 @@ extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
|
||||
* expect to see the same exact value for the same file if you change the
|
||||
* input buffer size or switch to a different liblzma version.
|
||||
*
|
||||
* Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
|
||||
* Valid 'action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
|
||||
* You only need to use LZMA_RUN; LZMA_FINISH is only supported because it
|
||||
* might be convenient for some applications. If you use LZMA_FINISH and if
|
||||
* lzma_code() asks the application to seek, remember to reset `action' back
|
||||
* lzma_code() asks the application to seek, remember to reset 'action' back
|
||||
* to LZMA_RUN unless you hit the end of the file again.
|
||||
*
|
||||
* Possible return values from lzma_code():
|
||||
@ -742,7 +862,17 @@ extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
|
||||
* - LZMA_MEMLIMIT_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \param strm Pointer to a properly prepared lzma_stream
|
||||
* \param[out] dest_index Pointer to a pointer where the decoder will put
|
||||
* the decoded lzma_index. The old value
|
||||
* of *dest_index is ignored (not freed).
|
||||
* \param memlimit How much memory the resulting lzma_index is
|
||||
* allowed to require. Use UINT64_MAX to
|
||||
* effectively disable the limiter.
|
||||
* \param file_size Size of the input .xz file
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
|
@ -1,6 +1,9 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/index_hash.h
|
||||
* \brief Validate Index by using a hash function
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*
|
||||
* Hashing makes it possible to use constant amount of memory to validate
|
||||
* Index of arbitrary size.
|
||||
@ -8,11 +11,6 @@
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -28,13 +26,21 @@ typedef struct lzma_index_hash_s lzma_index_hash;
|
||||
/**
|
||||
* \brief Allocate and initialize a new lzma_index_hash structure
|
||||
*
|
||||
* If index_hash is NULL, a new lzma_index_hash structure is allocated,
|
||||
* initialized, and a pointer to it returned. If allocation fails, NULL
|
||||
* is returned.
|
||||
* If index_hash is NULL, this function allocates and initializes a new
|
||||
* lzma_index_hash structure and returns a pointer to it. If allocation
|
||||
* fails, NULL is returned.
|
||||
*
|
||||
* If index_hash is non-NULL, it is reinitialized and the same pointer
|
||||
* returned. In this case, return value cannot be NULL or a different
|
||||
* pointer than the index_hash that was given as an argument.
|
||||
* If index_hash is non-NULL, this function reinitializes the lzma_index_hash
|
||||
* structure and returns the same pointer. In this case, return value cannot
|
||||
* be NULL or a different pointer than the index_hash that was given as
|
||||
* an argument.
|
||||
*
|
||||
* \param index_hash Pointer to a lzma_index_hash structure or NULL.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*
|
||||
* \return Initialized lzma_index_hash structure on success or
|
||||
* NULL on failure.
|
||||
*/
|
||||
extern LZMA_API(lzma_index_hash *) lzma_index_hash_init(
|
||||
lzma_index_hash *index_hash, const lzma_allocator *allocator)
|
||||
@ -43,6 +49,10 @@ extern LZMA_API(lzma_index_hash *) lzma_index_hash_init(
|
||||
|
||||
/**
|
||||
* \brief Deallocate lzma_index_hash structure
|
||||
*
|
||||
* \param index_hash Pointer to a lzma_index_hash structure to free.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
* Set to NULL to use malloc() and free().
|
||||
*/
|
||||
extern LZMA_API(void) lzma_index_hash_end(
|
||||
lzma_index_hash *index_hash, const lzma_allocator *allocator)
|
||||
@ -56,7 +66,8 @@ extern LZMA_API(void) lzma_index_hash_end(
|
||||
* \param unpadded_size Unpadded Size of a Block
|
||||
* \param uncompressed_size Uncompressed Size of a Block
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK
|
||||
* - LZMA_DATA_ERROR: Compressed or uncompressed size of the
|
||||
* Stream or size of the Index field would grow too big.
|
||||
* - LZMA_PROG_ERROR: Invalid arguments or this function is being
|
||||
@ -81,10 +92,11 @@ extern LZMA_API(lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash,
|
||||
*
|
||||
* \param index_hash Pointer to a lzma_index_hash structure
|
||||
* \param in Pointer to the beginning of the input buffer
|
||||
* \param in_pos in[*in_pos] is the next byte to process
|
||||
* \param[out] in_pos in[*in_pos] is the next byte to process
|
||||
* \param in_size in[in_size] is the first byte not to process
|
||||
*
|
||||
* \return - LZMA_OK: So far good, but more input is needed.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: So far good, but more input is needed.
|
||||
* - LZMA_STREAM_END: Index decoded successfully and it matches
|
||||
* the Records given with lzma_index_hash_append().
|
||||
* - LZMA_DATA_ERROR: Index is corrupt or doesn't match the
|
||||
@ -101,6 +113,10 @@ extern LZMA_API(lzma_ret) lzma_index_hash_decode(lzma_index_hash *index_hash,
|
||||
* \brief Get the size of the Index field as bytes
|
||||
*
|
||||
* This is needed to verify the Backward Size field in the Stream Footer.
|
||||
*
|
||||
* \param index_hash Pointer to a lzma_index_hash structure
|
||||
*
|
||||
* \return Size of the Index field in bytes.
|
||||
*/
|
||||
extern LZMA_API(lzma_vli) lzma_index_hash_size(
|
||||
const lzma_index_hash *index_hash)
|
||||
|
@ -1,15 +1,13 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/lzma12.h
|
||||
* \brief LZMA1 and LZMA2 filters
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -57,7 +55,7 @@
|
||||
*
|
||||
* Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds
|
||||
* support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion
|
||||
* when trying to compress uncompressible data), possibility to change
|
||||
* when trying to compress incompressible data), possibility to change
|
||||
* lc/lp/pb in the middle of encoding, and some other internal improvements.
|
||||
*/
|
||||
#define LZMA_FILTER_LZMA2 LZMA_VLI_C(0x21)
|
||||
@ -137,16 +135,20 @@ typedef enum {
|
||||
/**
|
||||
* \brief Test if given match finder is supported
|
||||
*
|
||||
* Return true if the given match finder is supported by this liblzma build.
|
||||
* Otherwise false is returned. It is safe to call this with a value that
|
||||
* isn't listed in lzma_match_finder enumeration; the return value will be
|
||||
* false.
|
||||
* It is safe to call this with a value that isn't listed in
|
||||
* lzma_match_finder enumeration; the return value will be false.
|
||||
*
|
||||
* There is no way to list which match finders are available in this
|
||||
* particular liblzma version and build. It would be useless, because
|
||||
* a new match finder, which the application developer wasn't aware,
|
||||
* could require giving additional options to the encoder that the older
|
||||
* match finders don't need.
|
||||
*
|
||||
* \param match_finder Match finder ID
|
||||
*
|
||||
* \return lzma_bool:
|
||||
* - true if the match finder is supported by this liblzma build.
|
||||
* - false otherwise.
|
||||
*/
|
||||
extern LZMA_API(lzma_bool) lzma_mf_is_supported(lzma_match_finder match_finder)
|
||||
lzma_nothrow lzma_attr_const;
|
||||
@ -181,14 +183,20 @@ typedef enum {
|
||||
/**
|
||||
* \brief Test if given compression mode is supported
|
||||
*
|
||||
* Return true if the given compression mode is supported by this liblzma
|
||||
* build. Otherwise false is returned. It is safe to call this with a value
|
||||
* that isn't listed in lzma_mode enumeration; the return value will be false.
|
||||
* It is safe to call this with a value that isn't listed in lzma_mode
|
||||
* enumeration; the return value will be false.
|
||||
*
|
||||
* There is no way to list which modes are available in this particular
|
||||
* liblzma version and build. It would be useless, because a new compression
|
||||
* mode, which the application developer wasn't aware, could require giving
|
||||
* additional options to the encoder that the older modes don't need.
|
||||
*
|
||||
* \param mode Mode ID.
|
||||
*
|
||||
* \return lzma_bool:
|
||||
* - true if the compression mode is supported by this liblzma
|
||||
* build.
|
||||
* - false otherwise.
|
||||
*/
|
||||
extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode)
|
||||
lzma_nothrow lzma_attr_const;
|
||||
@ -280,7 +288,7 @@ typedef struct {
|
||||
* \brief Number of literal context bits
|
||||
*
|
||||
* How many of the highest bits of the previous uncompressed
|
||||
* eight-bit byte (also known as `literal') are taken into
|
||||
* eight-bit byte (also known as 'literal') are taken into
|
||||
* account when predicting the bits of the next literal.
|
||||
*
|
||||
* E.g. in typical English text, an upper-case letter is
|
||||
@ -408,7 +416,7 @@ typedef struct {
|
||||
* like it is with LZMA_FILTER_LZMA1. Without this flag the
|
||||
* end marker isn't written and the application has to store
|
||||
* the uncompressed size somewhere outside the compressed stream.
|
||||
* To decompress streams without the end marker, the appliation
|
||||
* To decompress streams without the end marker, the application
|
||||
* has to set the correct uncompressed size in ext_size_low and
|
||||
* ext_size_high.
|
||||
*
|
||||
@ -480,16 +488,38 @@ typedef struct {
|
||||
* with the currently supported options, so it is safe to leave these
|
||||
* uninitialized.
|
||||
*/
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int4;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int5;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int6;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int7;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int8;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum4;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
void *reserved_ptr2;
|
||||
|
||||
} lzma_options_lzma;
|
||||
@ -517,13 +547,22 @@ do { \
|
||||
* The flags are defined in container.h, because the flags are used also
|
||||
* with lzma_easy_encoder().
|
||||
*
|
||||
* The preset values are subject to changes between liblzma versions.
|
||||
* The preset levels are subject to changes between liblzma versions.
|
||||
*
|
||||
* This function is available only if LZMA1 or LZMA2 encoder has been enabled
|
||||
* when building liblzma.
|
||||
*
|
||||
* \return On success, false is returned. If the preset is not
|
||||
* supported, true is returned.
|
||||
* If features (like certain match finders) have been disabled at build time,
|
||||
* then the function may return success (false) even though the resulting
|
||||
* LZMA1/LZMA2 options may not be usable for encoder initialization
|
||||
* (LZMA_OPTIONS_ERROR).
|
||||
*
|
||||
* \param[out] options Pointer to LZMA1 or LZMA2 options to be filled
|
||||
* \param preset Preset level bitwse-ORed with preset flags
|
||||
*
|
||||
* \return lzma_bool:
|
||||
* - true if the preset is not supported (failure).
|
||||
* - false otherwise (success).
|
||||
*/
|
||||
extern LZMA_API(lzma_bool) lzma_lzma_preset(
|
||||
lzma_options_lzma *options, uint32_t preset) lzma_nothrow;
|
||||
|
@ -1,15 +1,13 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/stream_flags.h
|
||||
* \brief .xz Stream Header and Stream Footer encoder and decoder
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -36,7 +34,7 @@ typedef struct {
|
||||
*
|
||||
* To prevent API and ABI breakages if new features are needed in
|
||||
* Stream Header or Stream Footer, a version number is used to
|
||||
* indicate which fields in this structure are in use. For now,
|
||||
* indicate which members in this structure are in use. For now,
|
||||
* version must always be zero. With non-zero version, the
|
||||
* lzma_stream_header_encode() and lzma_stream_footer_encode()
|
||||
* will return LZMA_OPTIONS_ERROR.
|
||||
@ -67,7 +65,15 @@ typedef struct {
|
||||
* Footer have been decoded.
|
||||
*/
|
||||
lzma_vli backward_size;
|
||||
|
||||
/**
|
||||
* \brief Minimum value for lzma_stream_flags.backward_size
|
||||
*/
|
||||
# define LZMA_BACKWARD_SIZE_MIN 4
|
||||
|
||||
/**
|
||||
* \brief Maximum value for lzma_stream_flags.backward_size
|
||||
*/
|
||||
# define LZMA_BACKWARD_SIZE_MAX (LZMA_VLI_C(1) << 34)
|
||||
|
||||
/**
|
||||
@ -87,19 +93,47 @@ typedef struct {
|
||||
* is just two bytes plus Backward Size of four bytes. But it's
|
||||
* nice to have the proper types when they are needed.)
|
||||
*/
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_reserved_enum reserved_enum4;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool2;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool3;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool4;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool5;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool6;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool7;
|
||||
|
||||
/** \private Reserved member. */
|
||||
lzma_bool reserved_bool8;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int1;
|
||||
|
||||
/** \private Reserved member. */
|
||||
uint32_t reserved_int2;
|
||||
|
||||
} lzma_stream_flags;
|
||||
@ -111,10 +145,11 @@ typedef struct {
|
||||
* \param options Stream Header options to be encoded.
|
||||
* options->backward_size is ignored and doesn't
|
||||
* need to be initialized.
|
||||
* \param out Beginning of the output buffer of
|
||||
* \param[out] out Beginning of the output buffer of
|
||||
* LZMA_STREAM_HEADER_SIZE bytes.
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_OPTIONS_ERROR: options->version is not supported by
|
||||
* this liblzma version.
|
||||
* - LZMA_PROG_ERROR: Invalid options.
|
||||
@ -128,10 +163,11 @@ extern LZMA_API(lzma_ret) lzma_stream_header_encode(
|
||||
* \brief Encode Stream Footer
|
||||
*
|
||||
* \param options Stream Footer options to be encoded.
|
||||
* \param out Beginning of the output buffer of
|
||||
* \param[out] out Beginning of the output buffer of
|
||||
* LZMA_STREAM_HEADER_SIZE bytes.
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_OPTIONS_ERROR: options->version is not supported by
|
||||
* this liblzma version.
|
||||
* - LZMA_PROG_ERROR: Invalid options.
|
||||
@ -144,32 +180,33 @@ extern LZMA_API(lzma_ret) lzma_stream_footer_encode(
|
||||
/**
|
||||
* \brief Decode Stream Header
|
||||
*
|
||||
* \param options Target for the decoded Stream Header options.
|
||||
* \param in Beginning of the input buffer of
|
||||
* LZMA_STREAM_HEADER_SIZE bytes.
|
||||
*
|
||||
* options->backward_size is always set to LZMA_VLI_UNKNOWN. This is to
|
||||
* help comparing Stream Flags from Stream Header and Stream Footer with
|
||||
* lzma_stream_flags_compare().
|
||||
*
|
||||
* \return - LZMA_OK: Decoding was successful.
|
||||
* \note When decoding .xz files that contain multiple Streams, it may
|
||||
* make sense to print "file format not recognized" only if
|
||||
* decoding of the Stream Header of the \a first Stream gives
|
||||
* LZMA_FORMAT_ERROR. If non-first Stream Header gives
|
||||
* LZMA_FORMAT_ERROR, the message used for LZMA_DATA_ERROR is
|
||||
* probably more appropriate.
|
||||
* For example, the Stream decoder in liblzma uses
|
||||
* LZMA_DATA_ERROR if LZMA_FORMAT_ERROR is returned by
|
||||
* lzma_stream_header_decode() when decoding non-first Stream.
|
||||
*
|
||||
* \param[out] options Target for the decoded Stream Header options.
|
||||
* \param in Beginning of the input buffer of
|
||||
* LZMA_STREAM_HEADER_SIZE bytes.
|
||||
*
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Decoding was successful.
|
||||
* - LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given
|
||||
* buffer cannot be Stream Header.
|
||||
* - LZMA_DATA_ERROR: CRC32 doesn't match, thus the header
|
||||
* is corrupt.
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported options are present
|
||||
* in the header.
|
||||
*
|
||||
* \note When decoding .xz files that contain multiple Streams, it may
|
||||
* make sense to print "file format not recognized" only if
|
||||
* decoding of the Stream Header of the _first_ Stream gives
|
||||
* LZMA_FORMAT_ERROR. If non-first Stream Header gives
|
||||
* LZMA_FORMAT_ERROR, the message used for LZMA_DATA_ERROR is
|
||||
* probably more appropriate.
|
||||
*
|
||||
* For example, Stream decoder in liblzma uses LZMA_DATA_ERROR if
|
||||
* LZMA_FORMAT_ERROR is returned by lzma_stream_header_decode()
|
||||
* when decoding non-first Stream.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_stream_header_decode(
|
||||
lzma_stream_flags *options, const uint8_t *in)
|
||||
@ -179,24 +216,25 @@ extern LZMA_API(lzma_ret) lzma_stream_header_decode(
|
||||
/**
|
||||
* \brief Decode Stream Footer
|
||||
*
|
||||
* \param options Target for the decoded Stream Header options.
|
||||
* \note If Stream Header was already decoded successfully, but
|
||||
* decoding Stream Footer returns LZMA_FORMAT_ERROR, the
|
||||
* application should probably report some other error message
|
||||
* than "file format not recognized". The file likely
|
||||
* is corrupt (possibly truncated). The Stream decoder in liblzma
|
||||
* uses LZMA_DATA_ERROR in this situation.
|
||||
*
|
||||
* \param[out] options Target for the decoded Stream Footer options.
|
||||
* \param in Beginning of the input buffer of
|
||||
* LZMA_STREAM_HEADER_SIZE bytes.
|
||||
*
|
||||
* \return - LZMA_OK: Decoding was successful.
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Decoding was successful.
|
||||
* - LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given
|
||||
* buffer cannot be Stream Footer.
|
||||
* - LZMA_DATA_ERROR: CRC32 doesn't match, thus the Stream Footer
|
||||
* is corrupt.
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported options are present
|
||||
* in Stream Footer.
|
||||
*
|
||||
* \note If Stream Header was already decoded successfully, but
|
||||
* decoding Stream Footer returns LZMA_FORMAT_ERROR, the
|
||||
* application should probably report some other error message
|
||||
* than "file format not recognized", since the file more likely
|
||||
* is corrupt (possibly truncated). Stream decoder in liblzma
|
||||
* uses LZMA_DATA_ERROR in this situation.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_stream_footer_decode(
|
||||
lzma_stream_flags *options, const uint8_t *in)
|
||||
@ -209,7 +247,11 @@ extern LZMA_API(lzma_ret) lzma_stream_footer_decode(
|
||||
* backward_size values are compared only if both are not
|
||||
* LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* \return - LZMA_OK: Both are equal. If either had backward_size set
|
||||
* \param a Pointer to lzma_stream_flags structure
|
||||
* \param b Pointer to lzma_stream_flags structure
|
||||
*
|
||||
* \return Possible lzma_ret values:
|
||||
* - LZMA_OK: Both are equal. If either had backward_size set
|
||||
* to LZMA_VLI_UNKNOWN, backward_size values were not
|
||||
* compared or validated.
|
||||
* - LZMA_DATA_ERROR: The structures differ.
|
||||
|
@ -1,15 +1,13 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/version.h
|
||||
* \brief Version number
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -17,14 +15,26 @@
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Version number split into components
|
||||
*/
|
||||
/** \brief Major version number of the liblzma release. */
|
||||
#define LZMA_VERSION_MAJOR 5
|
||||
#define LZMA_VERSION_MINOR 4
|
||||
#define LZMA_VERSION_PATCH 1
|
||||
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
|
||||
|
||||
/** \brief Minor version number of the liblzma release. */
|
||||
#define LZMA_VERSION_MINOR 7
|
||||
|
||||
/** \brief Patch version number of the liblzma release. */
|
||||
#define LZMA_VERSION_PATCH 0
|
||||
|
||||
/**
|
||||
* \brief Version stability marker
|
||||
*
|
||||
* This will always be one of three values:
|
||||
* - LZMA_VERSION_STABILITY_ALPHA
|
||||
* - LZMA_VERSION_STABILITY_BETA
|
||||
* - LZMA_VERSION_STABILITY_STABLE
|
||||
*/
|
||||
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_ALPHA
|
||||
|
||||
/** \brief Commit version number of the liblzma release */
|
||||
#ifndef LZMA_VERSION_COMMIT
|
||||
# define LZMA_VERSION_COMMIT ""
|
||||
#endif
|
||||
@ -95,15 +105,16 @@
|
||||
LZMA_VERSION_COMMIT)
|
||||
|
||||
|
||||
/* #ifndef is needed for use with windres (MinGW or Cygwin). */
|
||||
/* #ifndef is needed for use with windres (MinGW-w64 or Cygwin). */
|
||||
#ifndef LZMA_H_INTERNAL_RC
|
||||
|
||||
/**
|
||||
* \brief Run-time version number as an integer
|
||||
*
|
||||
* Return the value of LZMA_VERSION macro at the compile time of liblzma.
|
||||
* This allows the application to compare if it was built against the same,
|
||||
* This allows an application to compare if it was built against the same,
|
||||
* older, or newer version of liblzma that is currently running.
|
||||
*
|
||||
* \return The value of LZMA_VERSION macro at the compile time of liblzma
|
||||
*/
|
||||
extern LZMA_API(uint32_t) lzma_version_number(void)
|
||||
lzma_nothrow lzma_attr_const;
|
||||
@ -112,8 +123,10 @@ extern LZMA_API(uint32_t) lzma_version_number(void)
|
||||
/**
|
||||
* \brief Run-time version as a string
|
||||
*
|
||||
* This function may be useful if you want to display which version of
|
||||
* liblzma your application is currently using.
|
||||
* This function may be useful to display which version of liblzma an
|
||||
* application is currently using.
|
||||
*
|
||||
* \return Run-time version of liblzma
|
||||
*/
|
||||
extern LZMA_API(const char *) lzma_version_string(void)
|
||||
lzma_nothrow lzma_attr_const;
|
||||
|
@ -1,6 +1,9 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/**
|
||||
* \file lzma/vli.h
|
||||
* \brief Variable-length integer handling
|
||||
* \note Never include this file directly. Use <lzma.h> instead.
|
||||
*
|
||||
* In the .xz format, most integers are encoded in a variable-length
|
||||
* representation, which is sometimes called little endian base-128 encoding.
|
||||
@ -16,11 +19,6 @@
|
||||
|
||||
/*
|
||||
* Author: Lasse Collin
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* See ../lzma.h for information about liblzma as a whole.
|
||||
*/
|
||||
|
||||
#ifndef LZMA_H_INTERNAL
|
||||
@ -70,7 +68,8 @@ typedef uint64_t lzma_vli;
|
||||
* for example in the uncompressed_size and compressed_size variables.
|
||||
*
|
||||
* \return True if the integer is representable as VLI or if it
|
||||
* indicates unknown value.
|
||||
* indicates unknown value. False if the integer cannot be
|
||||
* represented as VLI.
|
||||
*/
|
||||
#define lzma_vli_is_valid(vli) \
|
||||
((vli) <= LZMA_VLI_MAX || (vli) == LZMA_VLI_UNKNOWN)
|
||||
@ -86,12 +85,12 @@ typedef uint64_t lzma_vli;
|
||||
* integer has been encoded.
|
||||
*
|
||||
* \param vli Integer to be encoded
|
||||
* \param vli_pos How many VLI-encoded bytes have already been written
|
||||
* \param[out] vli_pos How many VLI-encoded bytes have already been written
|
||||
* out. When starting to encode a new integer in
|
||||
* multi-call mode, *vli_pos must be set to zero.
|
||||
* To use single-call encoding, set vli_pos to NULL.
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* \param[out] out Beginning of the output buffer
|
||||
* \param[out] 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].
|
||||
*
|
||||
@ -121,15 +120,15 @@ extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli, size_t *vli_pos,
|
||||
*
|
||||
* Like lzma_vli_encode(), this function has single-call and multi-call modes.
|
||||
*
|
||||
* \param vli Pointer to decoded integer. The decoder will
|
||||
* \param[out] vli Pointer to decoded integer. The decoder will
|
||||
* initialize it to zero when *vli_pos == 0, so
|
||||
* application isn't required to initialize *vli.
|
||||
* \param vli_pos How many bytes have already been decoded. When
|
||||
* \param[out] vli_pos How many bytes have already been decoded. When
|
||||
* starting to decode a new integer in multi-call
|
||||
* mode, *vli_pos must be initialized to zero. To
|
||||
* use single-call decoding, set vli_pos to NULL.
|
||||
* \param in Beginning of the input buffer
|
||||
* \param in_pos The next byte will be read from in[*in_pos].
|
||||
* \param[out] in_pos The next byte will be read from in[*in_pos].
|
||||
* \param in_size Size of the input buffer; the first byte that
|
||||
* won't be read is in[in_size].
|
||||
*
|
||||
|
52
src/liblzma/check/Makefile.inc
Normal file
52
src/liblzma/check/Makefile.inc
Normal file
@ -0,0 +1,52 @@
|
||||
## SPDX-License-Identifier: 0BSD
|
||||
## Author: Lasse Collin
|
||||
|
||||
## Note: There is no check for COND_CHECK_CRC32 because
|
||||
## currently crc32 is always enabled.
|
||||
|
||||
EXTRA_DIST += \
|
||||
check/crc32_tablegen.c \
|
||||
check/crc64_tablegen.c
|
||||
|
||||
liblzma_la_SOURCES += \
|
||||
check/check.c \
|
||||
check/check.h \
|
||||
check/crc_common.h \
|
||||
check/crc_x86_clmul.h \
|
||||
check/crc32_arm64.h
|
||||
|
||||
if COND_SMALL
|
||||
liblzma_la_SOURCES += check/crc32_small.c
|
||||
else
|
||||
liblzma_la_SOURCES += \
|
||||
check/crc32_table.c \
|
||||
check/crc32_table_le.h \
|
||||
check/crc32_table_be.h
|
||||
if COND_ASM_X86
|
||||
liblzma_la_SOURCES += check/crc32_x86.S
|
||||
else
|
||||
liblzma_la_SOURCES += check/crc32_fast.c
|
||||
endif
|
||||
endif
|
||||
|
||||
if COND_CHECK_CRC64
|
||||
if COND_SMALL
|
||||
liblzma_la_SOURCES += check/crc64_small.c
|
||||
else
|
||||
liblzma_la_SOURCES += \
|
||||
check/crc64_table.c \
|
||||
check/crc64_table_le.h \
|
||||
check/crc64_table_be.h
|
||||
if COND_ASM_X86
|
||||
liblzma_la_SOURCES += check/crc64_x86.S
|
||||
else
|
||||
liblzma_la_SOURCES += check/crc64_fast.c
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if COND_CHECK_SHA256
|
||||
if COND_INTERNAL_SHA256
|
||||
liblzma_la_SOURCES += check/sha256.c
|
||||
endif
|
||||
endif
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file check.c
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "check.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file check.h
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef LZMA_CHECK_H
|
||||
@ -99,19 +98,22 @@ typedef struct {
|
||||
/// lzma_crc32_table[0] is needed by LZ encoder so we need to keep
|
||||
/// the array two-dimensional.
|
||||
#ifdef HAVE_SMALL
|
||||
lzma_attr_visibility_hidden
|
||||
extern uint32_t lzma_crc32_table[1][256];
|
||||
|
||||
extern void lzma_crc32_init(void);
|
||||
|
||||
#else
|
||||
|
||||
lzma_attr_visibility_hidden
|
||||
extern const uint32_t lzma_crc32_table[8][256];
|
||||
|
||||
lzma_attr_visibility_hidden
|
||||
extern const uint64_t lzma_crc64_table[4][256];
|
||||
#endif
|
||||
|
||||
|
||||
/// \brief Initialize *check depending on type
|
||||
///
|
||||
/// \return LZMA_OK on success. LZMA_UNSUPPORTED_CHECK if the type is not
|
||||
/// supported by the current version or build of liblzma.
|
||||
/// LZMA_PROG_ERROR if type > LZMA_CHECK_ID_MAX.
|
||||
extern void lzma_check_init(lzma_check_state *check, lzma_check type);
|
||||
|
||||
/// Update the check state
|
||||
|
119
src/liblzma/check/crc32_arm64.h
Normal file
119
src/liblzma/check/crc32_arm64.h
Normal file
@ -0,0 +1,119 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc32_arm64.h
|
||||
/// \brief CRC32 calculation with ARM64 optimization
|
||||
//
|
||||
// Authors: Chenxi Mao
|
||||
// Jia Tan
|
||||
// Hans Jansen
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef LZMA_CRC32_ARM64_H
|
||||
#define LZMA_CRC32_ARM64_H
|
||||
|
||||
// MSVC always has the CRC intrinsics available when building for ARM64
|
||||
// there is no need to include any header files.
|
||||
#ifndef _MSC_VER
|
||||
# include <arm_acle.h>
|
||||
#endif
|
||||
|
||||
#if defined(CRC32_GENERIC) && defined(CRC32_ARCH_OPTIMIZED)
|
||||
# if defined(HAVE_GETAUXVAL) || defined(HAVE_ELF_AUX_INFO)
|
||||
# include <sys/auxv.h>
|
||||
# elif defined(_WIN32)
|
||||
# include <processthreadsapi.h>
|
||||
# elif defined(__APPLE__) && defined(HAVE_SYSCTLBYNAME)
|
||||
# include <sys/sysctl.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Some EDG-based compilers support ARM64 and define __GNUC__
|
||||
// (such as Nvidia's nvcc), but do not support function attributes.
|
||||
//
|
||||
// NOTE: Build systems check for this too, keep them in sync with this.
|
||||
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__)
|
||||
# define crc_attr_target \
|
||||
__attribute__((__target__("+crc")))
|
||||
#else
|
||||
# define crc_attr_target
|
||||
#endif
|
||||
|
||||
|
||||
crc_attr_target
|
||||
static uint32_t
|
||||
crc32_arch_optimized(const uint8_t *buf, size_t size, uint32_t crc)
|
||||
{
|
||||
crc = ~crc;
|
||||
|
||||
// Align the input buffer because this was shown to be
|
||||
// significantly faster than unaligned accesses.
|
||||
const size_t align_amount = my_min(size, (8 - (uintptr_t)buf) & 7);
|
||||
|
||||
for (const uint8_t *limit = buf + align_amount; buf < limit; ++buf)
|
||||
crc = __crc32b(crc, *buf);
|
||||
|
||||
size -= align_amount;
|
||||
|
||||
// Process 8 bytes at a time. The end point is determined by
|
||||
// ignoring the least significant three bits of size to ensure
|
||||
// we do not process past the bounds of the buffer. This guarantees
|
||||
// that limit is a multiple of 8 and is strictly less than size.
|
||||
for (const uint8_t *limit = buf + (size & ~((size_t)7));
|
||||
buf < limit; buf += 8)
|
||||
crc = __crc32d(crc, aligned_read64le(buf));
|
||||
|
||||
// Process the remaining bytes that are not 8 byte aligned.
|
||||
for (const uint8_t *limit = buf + (size & 7); buf < limit; ++buf)
|
||||
crc = __crc32b(crc, *buf);
|
||||
|
||||
return ~crc;
|
||||
}
|
||||
|
||||
|
||||
#if defined(CRC32_GENERIC) && defined(CRC32_ARCH_OPTIMIZED)
|
||||
static inline bool
|
||||
is_arch_extension_supported(void)
|
||||
{
|
||||
#if defined(HAVE_GETAUXVAL)
|
||||
return (getauxval(AT_HWCAP) & HWCAP_CRC32) != 0;
|
||||
|
||||
#elif defined(HAVE_ELF_AUX_INFO)
|
||||
unsigned long feature_flags;
|
||||
|
||||
elf_aux_info(AT_HWCAP, &feature_flags, sizeof(feature_flags));
|
||||
return feature_flags & HWCAP_CRC32 != 0;
|
||||
|
||||
#elif defined(_WIN32)
|
||||
return IsProcessorFeaturePresent(
|
||||
PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE);
|
||||
|
||||
#elif defined(__APPLE__) && defined(HAVE_SYSCTLBYNAME)
|
||||
int has_crc32 = 0;
|
||||
size_t size = sizeof(has_crc32);
|
||||
|
||||
// The sysctlbyname() function requires a string identifier for the
|
||||
// CPU feature it tests. The Apple documentation lists the string
|
||||
// "hw.optional.armv8_crc32", which can be found here:
|
||||
// (https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics#3915619)
|
||||
int err = sysctlbyname("hw.optional.armv8_crc32", &has_crc32,
|
||||
&size, NULL, 0);
|
||||
|
||||
return !err && has_crc32;
|
||||
|
||||
#else
|
||||
// If a runtime detection method cannot be found, then this must
|
||||
// be a compile time error. The checks in crc_common.h should ensure
|
||||
// a runtime detection method is always found if this function is
|
||||
// built. It would be possible to just return false here, but this
|
||||
// is inefficient for binary size and runtime since only the generic
|
||||
// method could ever be used.
|
||||
# error Runtime detection method unavailable.
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // LZMA_CRC32_ARM64_H
|
@ -1,30 +1,35 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc32.c
|
||||
/// \brief CRC32 calculation
|
||||
///
|
||||
/// Calculate the CRC32 using the slice-by-eight algorithm.
|
||||
/// It is explained in this document:
|
||||
/// http://www.intel.com/technology/comms/perfnet/download/CRC_generators.pdf
|
||||
/// The code in this file is not the same as in Intel's paper, but
|
||||
/// the basic principle is identical.
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
// Authors: Lasse Collin
|
||||
// Ilya Kurdyukov
|
||||
// Hans Jansen
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "check.h"
|
||||
#include "crc_macros.h"
|
||||
#include "crc_common.h"
|
||||
|
||||
#if defined(CRC_X86_CLMUL)
|
||||
# define BUILDING_CRC32_CLMUL
|
||||
# include "crc_x86_clmul.h"
|
||||
#elif defined(CRC32_ARM64)
|
||||
# include "crc32_arm64.h"
|
||||
#endif
|
||||
|
||||
|
||||
// If you make any changes, do some benchmarking! Seemingly unrelated
|
||||
// changes can very easily ruin the performance (and very probably is
|
||||
// very compiler dependent).
|
||||
extern LZMA_API(uint32_t)
|
||||
lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
|
||||
#ifdef CRC32_GENERIC
|
||||
|
||||
///////////////////
|
||||
// Generic CRC32 //
|
||||
///////////////////
|
||||
|
||||
static uint32_t
|
||||
crc32_generic(const uint8_t *buf, size_t size, uint32_t crc)
|
||||
{
|
||||
crc = ~crc;
|
||||
|
||||
@ -80,3 +85,155 @@ lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
|
||||
|
||||
return ~crc;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CRC32_GENERIC) && defined(CRC32_ARCH_OPTIMIZED)
|
||||
|
||||
//////////////////////////
|
||||
// Function dispatching //
|
||||
//////////////////////////
|
||||
|
||||
// If both the generic and arch-optimized implementations are built, then
|
||||
// the function to use is selected at runtime because the system running
|
||||
// the binary might not have the arch-specific instruction set extension(s)
|
||||
// available. The three dispatch methods in order of priority:
|
||||
//
|
||||
// 1. Indirect function (ifunc). This method is slightly more efficient
|
||||
// than the constructor method because it will change the entry in the
|
||||
// Procedure Linkage Table (PLT) for the function either at load time or
|
||||
// at the first call. This avoids having to call the function through a
|
||||
// function pointer and will treat the function call like a regular call
|
||||
// through the PLT. ifuncs are created by using
|
||||
// __attribute__((__ifunc__("resolver"))) on a function which has no
|
||||
// body. The "resolver" is the name of the function that chooses at
|
||||
// runtime which implementation to use.
|
||||
//
|
||||
// 2. Constructor. This method uses __attribute__((__constructor__)) to
|
||||
// set crc32_func at load time. This avoids extra computation (and any
|
||||
// unlikely threading bugs) on the first call to lzma_crc32() to decide
|
||||
// which implementation should be used.
|
||||
//
|
||||
// 3. First Call Resolution. On the very first call to lzma_crc32(), the
|
||||
// call will be directed to crc32_dispatch() instead. This will set the
|
||||
// appropriate implementation function and will not be called again.
|
||||
// This method does not use any kind of locking but is safe because if
|
||||
// multiple threads run the dispatcher simultaneously then they will all
|
||||
// set crc32_func to the same value.
|
||||
|
||||
typedef uint32_t (*crc32_func_type)(
|
||||
const uint8_t *buf, size_t size, uint32_t crc);
|
||||
|
||||
// Clang 16.0.0 and older has a bug where it marks the ifunc resolver
|
||||
// function as unused since it is static and never used outside of
|
||||
// __attribute__((__ifunc__())).
|
||||
#if defined(CRC_USE_IFUNC) && defined(__clang__)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
// This resolver is shared between all three dispatch methods. It serves as
|
||||
// the ifunc resolver if ifunc is supported, otherwise it is called as a
|
||||
// regular function by the constructor or first call resolution methods.
|
||||
// The function attributes are needed for safe IFUNC resolver usage with GCC.
|
||||
lzma_resolver_attributes
|
||||
static crc32_func_type
|
||||
crc32_resolve(void)
|
||||
{
|
||||
return is_arch_extension_supported()
|
||||
? &crc32_arch_optimized : &crc32_generic;
|
||||
}
|
||||
|
||||
#if defined(CRC_USE_IFUNC) && defined(__clang__)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifndef CRC_USE_IFUNC
|
||||
|
||||
#ifdef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
|
||||
// Constructor method.
|
||||
# define CRC32_SET_FUNC_ATTR __attribute__((__constructor__))
|
||||
static crc32_func_type crc32_func;
|
||||
#else
|
||||
// First Call Resolution method.
|
||||
# define CRC32_SET_FUNC_ATTR
|
||||
static uint32_t crc32_dispatch(const uint8_t *buf, size_t size, uint32_t crc);
|
||||
static crc32_func_type crc32_func = &crc32_dispatch;
|
||||
#endif
|
||||
|
||||
CRC32_SET_FUNC_ATTR
|
||||
static void
|
||||
crc32_set_func(void)
|
||||
{
|
||||
crc32_func = crc32_resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
|
||||
static uint32_t
|
||||
crc32_dispatch(const uint8_t *buf, size_t size, uint32_t crc)
|
||||
{
|
||||
// When __attribute__((__ifunc__(...))) and
|
||||
// __attribute__((__constructor__)) isn't supported, set the
|
||||
// function pointer without any locking. If multiple threads run
|
||||
// the detection code in parallel, they will all end up setting
|
||||
// the pointer to the same value. This avoids the use of
|
||||
// mythread_once() on every call to lzma_crc32() but this likely
|
||||
// isn't strictly standards compliant. Let's change it if it breaks.
|
||||
crc32_set_func();
|
||||
return crc32_func(buf, size, crc);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CRC_USE_IFUNC
|
||||
extern LZMA_API(uint32_t)
|
||||
lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
|
||||
__attribute__((__ifunc__("crc32_resolve")));
|
||||
#else
|
||||
extern LZMA_API(uint32_t)
|
||||
lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
|
||||
{
|
||||
#if defined(CRC32_GENERIC) && defined(CRC32_ARCH_OPTIMIZED)
|
||||
// On x86-64, if CLMUL is available, it is the best for non-tiny
|
||||
// inputs, being over twice as fast as the generic slice-by-four
|
||||
// version. However, for size <= 16 it's different. In the extreme
|
||||
// case of size == 1 the generic version can be five times faster.
|
||||
// At size >= 8 the CLMUL starts to become reasonable. It
|
||||
// varies depending on the alignment of buf too.
|
||||
//
|
||||
// The above doesn't include the overhead of mythread_once().
|
||||
// At least on x86-64 GNU/Linux, pthread_once() is very fast but
|
||||
// it still makes lzma_crc32(buf, 1, crc) 50-100 % slower. When
|
||||
// size reaches 12-16 bytes the overhead becomes negligible.
|
||||
//
|
||||
// So using the generic version for size <= 16 may give better
|
||||
// performance with tiny inputs but if such inputs happen rarely
|
||||
// it's not so obvious because then the lookup table of the
|
||||
// generic version may not be in the processor cache.
|
||||
#ifdef CRC_USE_GENERIC_FOR_SMALL_INPUTS
|
||||
if (size <= 16)
|
||||
return crc32_generic(buf, size, crc);
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifndef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
|
||||
// See crc32_dispatch(). This would be the alternative which uses
|
||||
// locking and doesn't use crc32_dispatch(). Note that on Windows
|
||||
// this method needs Vista threads.
|
||||
mythread_once(crc64_set_func);
|
||||
#endif
|
||||
*/
|
||||
return crc32_func(buf, size, crc);
|
||||
|
||||
#elif defined(CRC32_ARCH_OPTIMIZED)
|
||||
return crc32_arch_optimized(buf, size, crc);
|
||||
|
||||
#else
|
||||
return crc32_generic(buf, size, crc);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc32_small.c
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "check.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc32_table.c
|
||||
@ -5,13 +7,32 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
||||
// FIXME: Compared to crc_common.h this has to check for __x86_64__ too
|
||||
// so that in 32-bit builds crc32_x86.S won't break due to a missing table.
|
||||
#if defined(HAVE_USABLE_CLMUL) && ((defined(__x86_64__) && defined(__SSSE3__) \
|
||||
&& defined(__SSE4_1__) && defined(__PCLMUL__)) \
|
||||
|| (defined(__e2k__) && __iset__ >= 6))
|
||||
# define X86_CLMUL_NO_TABLE 1
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ARM64_CRC32) \
|
||||
&& !defined(WORDS_BIGENDIAN) \
|
||||
&& defined(__ARM_FEATURE_CRC32)
|
||||
# define ARM64_CRC32_NO_TABLE 1
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(HAVE_ENCODERS) && (defined(X86_CLMUL_NO_TABLE) \
|
||||
|| defined(ARM64_CRC32_NO_TABLE_))
|
||||
// No table needed. Use a typedef to avoid an empty translation unit.
|
||||
typedef void lzma_crc32_dummy;
|
||||
|
||||
#else
|
||||
// Having the declaration here silences clang -Wmissing-variable-declarations.
|
||||
extern const uint32_t lzma_crc32_table[8][256];
|
||||
|
||||
@ -20,3 +41,4 @@ extern const uint32_t lzma_crc32_table[8][256];
|
||||
# else
|
||||
# include "crc32_table_le.h"
|
||||
# endif
|
||||
#endif
|
||||
|
@ -1,4 +1,6 @@
|
||||
/* This file has been automatically generated by crc32_tablegen.c. */
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
// This file has been generated by crc32_tablegen.c.
|
||||
|
||||
const uint32_t lzma_crc32_table[8][256] = {
|
||||
{
|
||||
|
@ -1,4 +1,6 @@
|
||||
/* This file has been automatically generated by crc32_tablegen.c. */
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
// This file has been generated by crc32_tablegen.c.
|
||||
|
||||
const uint32_t lzma_crc32_table[8][256] = {
|
||||
{
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc32_tablegen.c
|
||||
@ -9,9 +11,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <stdio.h>
|
||||
@ -54,8 +53,10 @@ init_crc32_table(void)
|
||||
static void
|
||||
print_crc32_table(void)
|
||||
{
|
||||
printf("/* This file has been automatically generated by "
|
||||
"crc32_tablegen.c. */\n\n"
|
||||
// Split the SPDX string so that it won't accidentally match
|
||||
// when tools search for the string.
|
||||
printf("// SPDX" "-License-Identifier" ": 0BSD\n\n"
|
||||
"// This file has been generated by crc32_tablegen.c.\n\n"
|
||||
"const uint32_t lzma_crc32_table[8][256] = {\n\t{");
|
||||
|
||||
for (size_t s = 0; s < 8; ++s) {
|
||||
@ -82,8 +83,10 @@ print_crc32_table(void)
|
||||
static void
|
||||
print_lz_table(void)
|
||||
{
|
||||
printf("/* This file has been automatically generated by "
|
||||
"crc32_tablegen.c. */\n\n"
|
||||
// Split the SPDX string so that it won't accidentally match
|
||||
// when tools search for the string.
|
||||
printf("// SPDX" "-License-Identifier" ": 0BSD\n\n"
|
||||
"// This file has been generated by crc32_tablegen.c.\n\n"
|
||||
"const uint32_t lzma_lz_hash_table[256] = {");
|
||||
|
||||
for (size_t b = 0; b < 256; ++b) {
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* SPDX-License-Identifier: 0BSD */
|
||||
|
||||
/*
|
||||
* Speed-optimized CRC32 using slicing-by-eight algorithm
|
||||
*
|
||||
@ -11,9 +13,6 @@
|
||||
* Authors: Igor Pavlov (original version)
|
||||
* Lasse Collin (AT&T syntax, PIC support, better portability)
|
||||
*
|
||||
* This file has been put into the public domain.
|
||||
* You can do whatever you want with this file.
|
||||
*
|
||||
* This code needs lzma_crc32_table, which can be created using the
|
||||
* following C code:
|
||||
|
||||
|
@ -1,85 +1,30 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc64.c
|
||||
/// \brief CRC64 calculation
|
||||
///
|
||||
/// There are two methods in this file. crc64_generic uses the
|
||||
/// the slice-by-four algorithm. This is the same idea that is
|
||||
/// used in crc32_fast.c, but for CRC64 we use only four tables
|
||||
/// instead of eight to avoid increasing CPU cache usage.
|
||||
///
|
||||
/// crc64_clmul uses 32/64-bit x86 SSSE3, SSE4.1, and CLMUL instructions.
|
||||
/// It was derived from
|
||||
/// https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-crc-computation-generic-polynomials-pclmulqdq-paper.pdf
|
||||
/// and the public domain code from https://github.com/rawrunprotected/crc
|
||||
/// (URLs were checked on 2022-11-07).
|
||||
///
|
||||
/// FIXME: Builds for 32-bit x86 use crc64_x86.S by default instead
|
||||
/// of this file and thus CLMUL version isn't available on 32-bit x86
|
||||
/// unless configured with --disable-assembler. Even then the lookup table
|
||||
/// isn't omitted in crc64_table.c since it doesn't know that assembly
|
||||
/// code has been disabled.
|
||||
//
|
||||
// Authors: Lasse Collin
|
||||
// Ilya Kurdyukov
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "check.h"
|
||||
#include "crc_common.h"
|
||||
|
||||
#undef CRC_GENERIC
|
||||
#undef CRC_CLMUL
|
||||
#undef CRC_USE_GENERIC_FOR_SMALL_INPUTS
|
||||
|
||||
// If CLMUL cannot be used then only the generic slice-by-four is built.
|
||||
#if !defined(HAVE_USABLE_CLMUL)
|
||||
# define CRC_GENERIC 1
|
||||
|
||||
// If CLMUL is allowed unconditionally in the compiler options then the
|
||||
// generic version can be omitted. Note that this doesn't work with MSVC
|
||||
// as I don't know how to detect the features here.
|
||||
//
|
||||
// NOTE: Keep this this in sync with crc64_table.c.
|
||||
#elif (defined(__SSSE3__) && defined(__SSE4_1__) && defined(__PCLMUL__)) \
|
||||
|| (defined(__e2k__) && __iset__ >= 6)
|
||||
# define CRC_CLMUL 1
|
||||
|
||||
// Otherwise build both and detect at runtime which version to use.
|
||||
#else
|
||||
# define CRC_GENERIC 1
|
||||
# define CRC_CLMUL 1
|
||||
|
||||
/*
|
||||
// The generic code is much faster with 1-8-byte inputs and has
|
||||
// similar performance up to 16 bytes at least in microbenchmarks
|
||||
// (it depends on input buffer alignment too). If both versions are
|
||||
// built, this #define will use the generic version for inputs up to
|
||||
// 16 bytes and CLMUL for bigger inputs. It saves a little in code
|
||||
// size since the special cases for 0-16-byte inputs will be omitted
|
||||
// from the CLMUL code.
|
||||
# define CRC_USE_GENERIC_FOR_SMALL_INPUTS 1
|
||||
*/
|
||||
|
||||
# if defined(_MSC_VER)
|
||||
# include <intrin.h>
|
||||
# elif defined(HAVE_CPUID_H)
|
||||
# include <cpuid.h>
|
||||
# endif
|
||||
#if defined(CRC_X86_CLMUL)
|
||||
# define BUILDING_CRC64_CLMUL
|
||||
# include "crc_x86_clmul.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CRC64_GENERIC
|
||||
|
||||
/////////////////////////////////
|
||||
// Generic slice-by-four CRC64 //
|
||||
/////////////////////////////////
|
||||
|
||||
#ifdef CRC_GENERIC
|
||||
|
||||
#include "crc_macros.h"
|
||||
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define A1(x) ((x) >> 56)
|
||||
#else
|
||||
@ -136,328 +81,52 @@ crc64_generic(const uint8_t *buf, size_t size, uint64_t crc)
|
||||
#endif
|
||||
|
||||
|
||||
/////////////////////
|
||||
// x86 CLMUL CRC64 //
|
||||
/////////////////////
|
||||
#if defined(CRC64_GENERIC) && defined(CRC64_ARCH_OPTIMIZED)
|
||||
|
||||
#ifdef CRC_CLMUL
|
||||
//////////////////////////
|
||||
// Function dispatching //
|
||||
//////////////////////////
|
||||
|
||||
#include <immintrin.h>
|
||||
// If both the generic and arch-optimized implementations are usable, then
|
||||
// the function that is used is selected at runtime. See crc32_fast.c.
|
||||
|
||||
typedef uint64_t (*crc64_func_type)(
|
||||
const uint8_t *buf, size_t size, uint64_t crc);
|
||||
|
||||
/*
|
||||
// These functions were used to generate the constants
|
||||
// at the top of crc64_clmul().
|
||||
static uint64_t
|
||||
calc_lo(uint64_t poly)
|
||||
{
|
||||
uint64_t a = poly;
|
||||
uint64_t b = 0;
|
||||
|
||||
for (unsigned i = 0; i < 64; ++i) {
|
||||
b = (b >> 1) | (a << 63);
|
||||
a = (a >> 1) ^ (a & 1 ? poly : 0);
|
||||
}
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
static uint64_t
|
||||
calc_hi(uint64_t poly, uint64_t a)
|
||||
{
|
||||
for (unsigned i = 0; i < 64; ++i)
|
||||
a = (a >> 1) ^ (a & 1 ? poly : 0);
|
||||
|
||||
return a;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
#define MASK_L(in, mask, r) \
|
||||
r = _mm_shuffle_epi8(in, mask)
|
||||
|
||||
#define MASK_H(in, mask, r) \
|
||||
r = _mm_shuffle_epi8(in, _mm_xor_si128(mask, vsign))
|
||||
|
||||
#define MASK_LH(in, mask, low, high) \
|
||||
MASK_L(in, mask, low); \
|
||||
MASK_H(in, mask, high)
|
||||
|
||||
|
||||
// MSVC (VS2015 - VS2022) produces bad 32-bit x86 code from the CLMUL CRC
|
||||
// code when optimizations are enabled (release build). According to the bug
|
||||
// report, the ebx register is corrupted and the calculated result is wrong.
|
||||
// Trying to workaround the problem with "__asm mov ebx, ebx" didn't help.
|
||||
// The following pragma works and performance is still good. x86-64 builds
|
||||
// aren't affected by this problem.
|
||||
//
|
||||
// NOTE: Another pragma after the function restores the optimizations.
|
||||
// If the #if condition here is updated, the other one must be updated too.
|
||||
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__clang__) \
|
||||
&& defined(_M_IX86)
|
||||
# pragma optimize("g", off)
|
||||
#endif
|
||||
|
||||
// EDG-based compilers (Intel's classic compiler and compiler for E2K) can
|
||||
// define __GNUC__ but the attribute must not be used with them.
|
||||
// The new Clang-based ICX needs the attribute.
|
||||
//
|
||||
// NOTE: Build systems check for this too, keep them in sync with this.
|
||||
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__)
|
||||
__attribute__((__target__("ssse3,sse4.1,pclmul")))
|
||||
#endif
|
||||
static uint64_t
|
||||
crc64_clmul(const uint8_t *buf, size_t size, uint64_t crc)
|
||||
{
|
||||
// The prototypes of the intrinsics use signed types while most of
|
||||
// the values are treated as unsigned here. These warnings in this
|
||||
// function have been checked and found to be harmless so silence them.
|
||||
#if TUKLIB_GNUC_REQ(4, 6) || defined(__clang__)
|
||||
#if defined(CRC_USE_IFUNC) && defined(__clang__)
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wsign-conversion"
|
||||
# pragma GCC diagnostic ignored "-Wconversion"
|
||||
# pragma GCC diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
#ifndef CRC_USE_GENERIC_FOR_SMALL_INPUTS
|
||||
// The code assumes that there is at least one byte of input.
|
||||
if (size == 0)
|
||||
return crc;
|
||||
#endif
|
||||
|
||||
// const uint64_t poly = 0xc96c5795d7870f42; // CRC polynomial
|
||||
const uint64_t p = 0x92d8af2baf0e1e85; // (poly << 1) | 1
|
||||
const uint64_t mu = 0x9c3e466c172963d5; // (calc_lo(poly) << 1) | 1
|
||||
const uint64_t k2 = 0xdabe95afc7875f40; // calc_hi(poly, 1)
|
||||
const uint64_t k1 = 0xe05dd497ca393ae4; // calc_hi(poly, k2)
|
||||
const __m128i vfold0 = _mm_set_epi64x(p, mu);
|
||||
const __m128i vfold1 = _mm_set_epi64x(k2, k1);
|
||||
|
||||
// Create a vector with 8-bit values 0 to 15. This is used to
|
||||
// construct control masks for _mm_blendv_epi8 and _mm_shuffle_epi8.
|
||||
const __m128i vramp = _mm_setr_epi32(
|
||||
0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c);
|
||||
|
||||
// This is used to inverse the control mask of _mm_shuffle_epi8
|
||||
// so that bytes that wouldn't be picked with the original mask
|
||||
// will be picked and vice versa.
|
||||
const __m128i vsign = _mm_set1_epi8(0x80);
|
||||
|
||||
// Memory addresses A to D and the distances between them:
|
||||
//
|
||||
// A B C D
|
||||
// [skip_start][size][skip_end]
|
||||
// [ size2 ]
|
||||
//
|
||||
// A and D are 16-byte aligned. B and C are 1-byte aligned.
|
||||
// skip_start and skip_end are 0-15 bytes. size is at least 1 byte.
|
||||
//
|
||||
// A = aligned_buf will initially point to this address.
|
||||
// B = The address pointed by the caller-supplied buf.
|
||||
// C = buf + size == aligned_buf + size2
|
||||
// D = buf + size + skip_end == aligned_buf + size2 + skip_end
|
||||
const size_t skip_start = (size_t)((uintptr_t)buf & 15);
|
||||
const size_t skip_end = (size_t)(-(uintptr_t)(buf + size) & 15);
|
||||
const __m128i *aligned_buf = (const __m128i *)(
|
||||
(uintptr_t)buf & ~(uintptr_t)15);
|
||||
|
||||
// If size2 <= 16 then the whole input fits into a single 16-byte
|
||||
// vector. If size2 > 16 then at least two 16-byte vectors must
|
||||
// be processed. If size2 > 16 && size <= 16 then there is only
|
||||
// one 16-byte vector's worth of input but it is unaligned in memory.
|
||||
//
|
||||
// NOTE: There is no integer overflow here if the arguments are valid.
|
||||
// If this overflowed, buf + size would too.
|
||||
size_t size2 = skip_start + size;
|
||||
|
||||
// Masks to be used with _mm_blendv_epi8 and _mm_shuffle_epi8:
|
||||
// The first skip_start or skip_end bytes in the vectors will have
|
||||
// the high bit (0x80) set. _mm_blendv_epi8 and _mm_shuffle_epi8
|
||||
// will produce zeros for these positions. (Bitwise-xor of these
|
||||
// masks with vsign will produce the opposite behavior.)
|
||||
const __m128i mask_start
|
||||
= _mm_sub_epi8(vramp, _mm_set1_epi8(skip_start));
|
||||
const __m128i mask_end = _mm_sub_epi8(vramp, _mm_set1_epi8(skip_end));
|
||||
|
||||
// Get the first 1-16 bytes into data0. If loading less than 16 bytes,
|
||||
// the bytes are loaded to the high bits of the vector and the least
|
||||
// significant positions are filled with zeros.
|
||||
const __m128i data0 = _mm_blendv_epi8(_mm_load_si128(aligned_buf),
|
||||
_mm_setzero_si128(), mask_start);
|
||||
++aligned_buf;
|
||||
|
||||
#if defined(__i386__) || defined(_M_IX86)
|
||||
const __m128i initial_crc = _mm_set_epi64x(0, ~crc);
|
||||
#else
|
||||
// GCC and Clang would produce good code with _mm_set_epi64x
|
||||
// but MSVC needs _mm_cvtsi64_si128 on x86-64.
|
||||
const __m128i initial_crc = _mm_cvtsi64_si128(~crc);
|
||||
#endif
|
||||
|
||||
__m128i v0, v1, v2, v3;
|
||||
|
||||
#ifndef CRC_USE_GENERIC_FOR_SMALL_INPUTS
|
||||
if (size <= 16) {
|
||||
// Right-shift initial_crc by 1-16 bytes based on "size"
|
||||
// and store the result in v1 (high bytes) and v0 (low bytes).
|
||||
//
|
||||
// NOTE: The highest 8 bytes of initial_crc are zeros so
|
||||
// v1 will be filled with zeros if size >= 8. The highest 8
|
||||
// bytes of v1 will always become zeros.
|
||||
//
|
||||
// [ v1 ][ v0 ]
|
||||
// [ initial_crc ] size == 1
|
||||
// [ initial_crc ] size == 2
|
||||
// [ initial_crc ] size == 15
|
||||
// [ initial_crc ] size == 16 (all in v0)
|
||||
const __m128i mask_low = _mm_add_epi8(
|
||||
vramp, _mm_set1_epi8(size - 16));
|
||||
MASK_LH(initial_crc, mask_low, v0, v1);
|
||||
|
||||
if (size2 <= 16) {
|
||||
// There are 1-16 bytes of input and it is all
|
||||
// in data0. Copy the input bytes to v3. If there
|
||||
// are fewer than 16 bytes, the low bytes in v3
|
||||
// will be filled with zeros. That is, the input
|
||||
// bytes are stored to the same position as
|
||||
// (part of) initial_crc is in v0.
|
||||
MASK_L(data0, mask_end, v3);
|
||||
} else {
|
||||
// There are 2-16 bytes of input but not all bytes
|
||||
// are in data0.
|
||||
const __m128i data1 = _mm_load_si128(aligned_buf);
|
||||
|
||||
// Collect the 2-16 input bytes from data0 and data1
|
||||
// to v2 and v3, and bitwise-xor them with the
|
||||
// low bits of initial_crc in v0. Note that the
|
||||
// the second xor is below this else-block as it
|
||||
// is shared with the other branch.
|
||||
MASK_H(data0, mask_end, v2);
|
||||
MASK_L(data1, mask_end, v3);
|
||||
v0 = _mm_xor_si128(v0, v2);
|
||||
}
|
||||
|
||||
v0 = _mm_xor_si128(v0, v3);
|
||||
v1 = _mm_alignr_epi8(v1, v0, 8);
|
||||
} else
|
||||
#endif
|
||||
lzma_resolver_attributes
|
||||
static crc64_func_type
|
||||
crc64_resolve(void)
|
||||
{
|
||||
const __m128i data1 = _mm_load_si128(aligned_buf);
|
||||
MASK_LH(initial_crc, mask_start, v0, v1);
|
||||
v0 = _mm_xor_si128(v0, data0);
|
||||
v1 = _mm_xor_si128(v1, data1);
|
||||
|
||||
#define FOLD \
|
||||
v1 = _mm_xor_si128(v1, _mm_clmulepi64_si128(v0, vfold1, 0x00)); \
|
||||
v0 = _mm_xor_si128(v1, _mm_clmulepi64_si128(v0, vfold1, 0x11));
|
||||
|
||||
while (size2 > 32) {
|
||||
++aligned_buf;
|
||||
size2 -= 16;
|
||||
FOLD
|
||||
v1 = _mm_load_si128(aligned_buf);
|
||||
return is_arch_extension_supported()
|
||||
? &crc64_arch_optimized : &crc64_generic;
|
||||
}
|
||||
|
||||
if (size2 < 32) {
|
||||
MASK_H(v0, mask_end, v2);
|
||||
MASK_L(v0, mask_end, v0);
|
||||
MASK_L(v1, mask_end, v3);
|
||||
v1 = _mm_or_si128(v2, v3);
|
||||
}
|
||||
|
||||
FOLD
|
||||
v1 = _mm_srli_si128(v0, 8);
|
||||
#undef FOLD
|
||||
}
|
||||
|
||||
v1 = _mm_xor_si128(_mm_clmulepi64_si128(v0, vfold1, 0x10), v1);
|
||||
v0 = _mm_clmulepi64_si128(v1, vfold0, 0x00);
|
||||
v2 = _mm_clmulepi64_si128(v0, vfold0, 0x10);
|
||||
v0 = _mm_xor_si128(_mm_xor_si128(v2, _mm_slli_si128(v0, 8)), v1);
|
||||
|
||||
#if defined(__i386__) || defined(_M_IX86)
|
||||
return ~(((uint64_t)(uint32_t)_mm_extract_epi32(v0, 3) << 32) |
|
||||
(uint64_t)(uint32_t)_mm_extract_epi32(v0, 2));
|
||||
#else
|
||||
return ~(uint64_t)_mm_extract_epi64(v0, 1);
|
||||
#endif
|
||||
|
||||
#if TUKLIB_GNUC_REQ(4, 6) || defined(__clang__)
|
||||
#if defined(CRC_USE_IFUNC) && defined(__clang__)
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__clang__) \
|
||||
&& defined(_M_IX86)
|
||||
# pragma optimize("", on)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////
|
||||
// Detect CPU support //
|
||||
////////////////////////
|
||||
|
||||
#if defined(CRC_GENERIC) && defined(CRC_CLMUL)
|
||||
static inline bool
|
||||
is_clmul_supported(void)
|
||||
{
|
||||
int success = 1;
|
||||
uint32_t r[4]; // eax, ebx, ecx, edx
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// This needs <intrin.h> with MSVC. ICC has it as a built-in
|
||||
// on all platforms.
|
||||
__cpuid(r, 1);
|
||||
#elif defined(HAVE_CPUID_H)
|
||||
// Compared to just using __asm__ to run CPUID, this also checks
|
||||
// that CPUID is supported and saves and restores ebx as that is
|
||||
// needed with GCC < 5 with position-independent code (PIC).
|
||||
success = __get_cpuid(1, &r[0], &r[1], &r[2], &r[3]);
|
||||
#else
|
||||
// Just a fallback that shouldn't be needed.
|
||||
__asm__("cpuid\n\t"
|
||||
: "=a"(r[0]), "=b"(r[1]), "=c"(r[2]), "=d"(r[3])
|
||||
: "a"(1), "c"(0));
|
||||
#endif
|
||||
|
||||
// Returns true if these are supported:
|
||||
// CLMUL (bit 1 in ecx)
|
||||
// SSSE3 (bit 9 in ecx)
|
||||
// SSE4.1 (bit 19 in ecx)
|
||||
const uint32_t ecx_mask = (1 << 1) | (1 << 9) | (1 << 19);
|
||||
return success && (r[2] & ecx_mask) == ecx_mask;
|
||||
|
||||
// Alternative methods that weren't used:
|
||||
// - ICC's _may_i_use_cpu_feature: the other methods should work too.
|
||||
// - GCC >= 6 / Clang / ICX __builtin_cpu_supports("pclmul")
|
||||
//
|
||||
// CPUID decding is needed with MSVC anyway and older GCC. This keeps
|
||||
// the feature checks in the build system simpler too. The nice thing
|
||||
// about __builtin_cpu_supports would be that it generates very short
|
||||
// code as is it only reads a variable set at startup but a few bytes
|
||||
// doesn't matter here.
|
||||
}
|
||||
|
||||
#ifndef CRC_USE_IFUNC
|
||||
|
||||
#ifdef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
|
||||
# define CRC64_FUNC_INIT
|
||||
# define CRC64_SET_FUNC_ATTR __attribute__((__constructor__))
|
||||
static crc64_func_type crc64_func;
|
||||
#else
|
||||
# define CRC64_FUNC_INIT = &crc64_dispatch
|
||||
# define CRC64_SET_FUNC_ATTR
|
||||
static uint64_t crc64_dispatch(const uint8_t *buf, size_t size, uint64_t crc);
|
||||
static crc64_func_type crc64_func = &crc64_dispatch;
|
||||
#endif
|
||||
|
||||
|
||||
// Pointer to the the selected CRC64 method.
|
||||
static uint64_t (*crc64_func)(const uint8_t *buf, size_t size, uint64_t crc)
|
||||
CRC64_FUNC_INIT;
|
||||
|
||||
|
||||
CRC64_SET_FUNC_ATTR
|
||||
static void
|
||||
crc64_set_func(void)
|
||||
{
|
||||
crc64_func = is_clmul_supported() ? &crc64_clmul : &crc64_generic;
|
||||
crc64_func = crc64_resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -466,65 +135,41 @@ crc64_set_func(void)
|
||||
static uint64_t
|
||||
crc64_dispatch(const uint8_t *buf, size_t size, uint64_t crc)
|
||||
{
|
||||
// When __attribute__((__constructor__)) isn't supported, set the
|
||||
// function pointer without any locking. If multiple threads run
|
||||
// the detection code in parallel, they will all end up setting
|
||||
// the pointer to the same value. This avoids the use of
|
||||
// mythread_once() on every call to lzma_crc64() but this likely
|
||||
// isn't strictly standards compliant. Let's change it if it breaks.
|
||||
crc64_set_func();
|
||||
return crc64_func(buf, size, crc);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CRC_USE_IFUNC
|
||||
extern LZMA_API(uint64_t)
|
||||
lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
|
||||
__attribute__((__ifunc__("crc64_resolve")));
|
||||
#else
|
||||
extern LZMA_API(uint64_t)
|
||||
lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
|
||||
{
|
||||
#if defined(CRC_GENERIC) && defined(CRC_CLMUL)
|
||||
// If CLMUL is available, it is the best for non-tiny inputs,
|
||||
// being over twice as fast as the generic slice-by-four version.
|
||||
// However, for size <= 16 it's different. In the extreme case
|
||||
// of size == 1 the generic version can be five times faster.
|
||||
// At size >= 8 the CLMUL starts to become reasonable. It
|
||||
// varies depending on the alignment of buf too.
|
||||
//
|
||||
// The above doesn't include the overhead of mythread_once().
|
||||
// At least on x86-64 GNU/Linux, pthread_once() is very fast but
|
||||
// it still makes lzma_crc64(buf, 1, crc) 50-100 % slower. When
|
||||
// size reaches 12-16 bytes the overhead becomes negligible.
|
||||
//
|
||||
// So using the generic version for size <= 16 may give better
|
||||
// performance with tiny inputs but if such inputs happen rarely
|
||||
// it's not so obvious because then the lookup table of the
|
||||
// generic version may not be in the processor cache.
|
||||
#if defined(CRC64_GENERIC) && defined(CRC64_ARCH_OPTIMIZED)
|
||||
|
||||
#ifdef CRC_USE_GENERIC_FOR_SMALL_INPUTS
|
||||
if (size <= 16)
|
||||
return crc64_generic(buf, size, crc);
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifndef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
|
||||
// See crc64_dispatch(). This would be the alternative which uses
|
||||
// locking and doesn't use crc64_dispatch(). Note that on Windows
|
||||
// this method needs Vista threads.
|
||||
mythread_once(crc64_set_func);
|
||||
#endif
|
||||
*/
|
||||
|
||||
return crc64_func(buf, size, crc);
|
||||
|
||||
#elif defined(CRC_CLMUL)
|
||||
// If CLMUL is used unconditionally without runtime CPU detection
|
||||
// then omitting the generic version and its 8 KiB lookup table
|
||||
// makes the library smaller.
|
||||
#elif defined(CRC64_ARCH_OPTIMIZED)
|
||||
// If arch-optimized version is used unconditionally without runtime
|
||||
// CPU detection then omitting the generic version and its 8 KiB
|
||||
// lookup table makes the library smaller.
|
||||
//
|
||||
// FIXME: Lookup table isn't currently omitted on 32-bit x86,
|
||||
// see crc64_table.c.
|
||||
return crc64_clmul(buf, size, crc);
|
||||
return crc64_arch_optimized(buf, size, crc);
|
||||
|
||||
#else
|
||||
return crc64_generic(buf, size, crc);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc64_small.c
|
||||
@ -5,9 +7,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "check.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc64_table.c
|
||||
@ -5,23 +7,23 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
||||
// FIXME: Compared to crc64_fast.c this has to check for __x86_64__ too
|
||||
// FIXME: Compared to crc_common.h this has to check for __x86_64__ too
|
||||
// so that in 32-bit builds crc64_x86.S won't break due to a missing table.
|
||||
#if (defined(__x86_64__) && defined(__SSSE3__) \
|
||||
#if defined(HAVE_USABLE_CLMUL) && ((defined(__x86_64__) && defined(__SSSE3__) \
|
||||
&& defined(__SSE4_1__) && defined(__PCLMUL__)) \
|
||||
|| (defined(__e2k__) && __iset__ >= 6)
|
||||
// No table needed but something has to be exported to keep some toolchains
|
||||
// happy. Also use a declaration to silence compiler warnings.
|
||||
extern const char lzma_crc64_dummy;
|
||||
const char lzma_crc64_dummy;
|
||||
|| (defined(__e2k__) && __iset__ >= 6))
|
||||
# define X86_CLMUL_NO_TABLE 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef X86_CLMUL_NO_TABLE
|
||||
// No table needed. Use a typedef to avoid an empty translation unit.
|
||||
typedef void lzma_crc64_dummy;
|
||||
|
||||
#else
|
||||
// Having the declaration here silences clang -Wmissing-variable-declarations.
|
||||
|
@ -1,4 +1,6 @@
|
||||
/* This file has been automatically generated by crc64_tablegen.c. */
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
// This file has been generated by crc64_tablegen.c.
|
||||
|
||||
const uint64_t lzma_crc64_table[4][256] = {
|
||||
{
|
||||
|
@ -1,4 +1,6 @@
|
||||
/* This file has been automatically generated by crc64_tablegen.c. */
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
// This file has been generated by crc64_tablegen.c.
|
||||
|
||||
const uint64_t lzma_crc64_table[4][256] = {
|
||||
{
|
||||
|
@ -1,3 +1,5 @@
|
||||
// SPDX-License-Identifier: 0BSD
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc64_tablegen.c
|
||||
@ -8,9 +10,6 @@
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
// This file has been put into the public domain.
|
||||
// You can do whatever you want with this file.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <stdio.h>
|
||||
@ -53,8 +52,10 @@ init_crc64_table(void)
|
||||
static void
|
||||
print_crc64_table(void)
|
||||
{
|
||||
printf("/* This file has been automatically generated by "
|
||||
"crc64_tablegen.c. */\n\n"
|
||||
// Split the SPDX string so that it won't accidentally match
|
||||
// when tools search for the string.
|
||||
printf("// SPDX" "-License-Identifier" ": 0BSD\n\n"
|
||||
"// This file has been generated by crc64_tablegen.c.\n\n"
|
||||
"const uint64_t lzma_crc64_table[4][256] = {\n\t{");
|
||||
|
||||
for (size_t s = 0; s < 4; ++s) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user